Commit 0ff89759 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix cancel_all specs

parent d9ece71e
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- if @ci_project && current_user && can?(current_user, :manage_builds, @project) - if @ci_project && current_user && can?(current_user, :manage_builds, @project)
.pull-left.hidden-xs .pull-left.hidden-xs
- if @all_builds.running_or_pending.any? - 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 %ul.center-top-menu
%li{class: ('active' if @scope.nil?)} %li{class: ('active' if @scope.nil?)}
......
...@@ -587,7 +587,7 @@ Gitlab::Application.routes.draw do ...@@ -587,7 +587,7 @@ Gitlab::Application.routes.draw do
resources :builds, only: [:index, :show] do resources :builds, only: [:index, :show] do
collection do collection do
post :cancel_all get :cancel_all
end end
member do member do
......
...@@ -47,10 +47,10 @@ describe "Builds" do ...@@ -47,10 +47,10 @@ describe "Builds" do
end end
end end
describe "POST /:project/builds/:id/cancel_all" do describe "GET /:project/builds/:id/cancel_all" do
before do before do
@build.run! @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 end
it { expect(page).to have_content 'All' } it { expect(page).to have_content 'All' }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment