Update specs to be valid only for tagged runner
This commit is contained in:
parent
dd8e9e2d7a
commit
2ee24bd9ec
1 changed files with 14 additions and 10 deletions
|
@ -126,17 +126,21 @@ describe "Runners" do
|
||||||
expect(page).to have_content 'Can run untagged jobs Yes'
|
expect(page).to have_content 'Can run untagged jobs Yes'
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'user want to prevent runner from running untagged job' do
|
context 'when runner has tags' do
|
||||||
visit runners_path(project)
|
before { runner.update_attribute(:tag_list, ['tag']) }
|
||||||
page.within('.activated-specific-runners') do
|
|
||||||
first('small > a').click
|
scenario 'user want to prevent runner from running untagged job' do
|
||||||
|
visit runners_path(project)
|
||||||
|
page.within('.activated-specific-runners') do
|
||||||
|
first('small > a').click
|
||||||
|
end
|
||||||
|
|
||||||
|
uncheck 'runner_run_untagged'
|
||||||
|
click_button 'Save changes'
|
||||||
|
|
||||||
|
expect(page).to have_content 'Can run untagged jobs No'
|
||||||
|
expect(runner.reload.run_untagged?).to eq false
|
||||||
end
|
end
|
||||||
|
|
||||||
uncheck 'runner_run_untagged'
|
|
||||||
click_button 'Save changes'
|
|
||||||
|
|
||||||
expect(page).to have_content 'Can run untagged jobs No'
|
|
||||||
expect(runner.reload.run_untagged?).to eq false
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue