Fix cancel_all specs
This commit is contained in:
parent
d9ece71ef0
commit
0ff8975939
3 changed files with 4 additions and 4 deletions
|
@ -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?)}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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' }
|
||||
|
|
Loading…
Reference in a new issue