Commit 2c23465d authored by Annabel Dunstone's avatar Annabel Dunstone

Move deployable conditional to variable; fix pipelines_spec

parent bfe2259b
%li.build{class: ("playable" if subject.playable? && can?(current_user, :update_build, @project))}
- is_playable = subject.playable? && can?(current_user, :update_build, @project)
%li.build{class: ("playable" if is_playable)}
.build-content
- if subject.playable? && can?(current_user, :update_build, @project)
- if is_playable
= link_to play_namespace_project_build_path(subject.project.namespace, subject.project, subject, return_to: request.original_url), method: :post, title: 'Play' do
= render_status_with_link('build', 'play')
= subject.name
......
......@@ -193,7 +193,11 @@ describe "Pipelines" do
end
context 'playing manual build' do
before { click_link('Play') }
before do
within '.pipeline-holder' do
click_link('Play')
end
end
it { expect(@manual.reload).to be_pending }
end
......
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