diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-14 19:57:20 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-14 19:59:56 +0200 |
commit | 0ff8975939846a3d013421d1f46baf3cbb77dec2 (patch) | |
tree | 2183743883a42dd3ae7832f84af9acfd5e9168da | |
parent | d9ece71ef0677a1d3468697485db7cbcf1b83745 (diff) | |
download | gitlab-ce-0ff8975939846a3d013421d1f46baf3cbb77dec2.tar.gz |
Fix cancel_all specs
-rw-r--r-- | app/views/projects/builds/index.html.haml | 2 | ||||
-rw-r--r-- | config/routes.rb | 2 | ||||
-rw-r--r-- | spec/features/builds_spec.rb | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml index 56bb7b11177..b04784025f1 100644 --- a/app/views/projects/builds/index.html.haml +++ b/app/views/projects/builds/index.html.haml @@ -6,7 +6,7 @@ - if @ci_project && current_user && can?(current_user, :manage_builds, @project) .pull-left.hidden-xs - if @all_builds.running_or_pending.any? - = link_to 'Cancel all', cancel_all_namespace_project_builds_path(@project.namespace, @project), data: { confirm: 'Are you sure?' }, method: :post, class: 'btn btn-danger' + = link_to 'Cancel all', cancel_all_namespace_project_builds_path(@project.namespace, @project), data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' %ul.center-top-menu %li{class: ('active' if @scope.nil?)} diff --git a/config/routes.rb b/config/routes.rb index 3253d950f27..06abc2820a5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -587,7 +587,7 @@ Gitlab::Application.routes.draw do resources :builds, only: [:index, :show] do collection do - post :cancel_all + get :cancel_all end member do diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb index a339a151112..941e45408a7 100644 --- a/spec/features/builds_spec.rb +++ b/spec/features/builds_spec.rb @@ -47,10 +47,10 @@ describe "Builds" do end end - describe "POST /:project/builds/:id/cancel_all" do + describe "GET /:project/builds/:id/cancel_all" do before do @build.run! - visit cancel_namespace_project_build_path(@gl_project.namespace, @gl_project, @build) + visit cancel_all_namespace_project_builds_path(@gl_project.namespace, @gl_project) end it { expect(page).to have_content 'All' } |