diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-05-06 08:41:51 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-05-19 22:01:53 +0200 |
commit | 2ee24bd9ece394269c006f9762d3fa5e16876949 (patch) | |
tree | a3ae07164453a03060258bacb65cd7adaf4e6a0e /spec/features/runners_spec.rb | |
parent | dd8e9e2d7acf05b837a3bacd1258e9f3df4254a6 (diff) | |
download | gitlab-ce-2ee24bd9ece394269c006f9762d3fa5e16876949.tar.gz |
Update specs to be valid only for tagged runner
Diffstat (limited to 'spec/features/runners_spec.rb')
-rw-r--r-- | spec/features/runners_spec.rb | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/spec/features/runners_spec.rb b/spec/features/runners_spec.rb index 4f942c3ab1c..2c9c12b4dfa 100644 --- a/spec/features/runners_spec.rb +++ b/spec/features/runners_spec.rb @@ -126,17 +126,21 @@ describe "Runners" do expect(page).to have_content 'Can run untagged jobs Yes' end - 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 + context 'when runner has tags' do + before { runner.update_attribute(:tag_list, ['tag']) } - uncheck 'runner_run_untagged' - click_button 'Save changes' + 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 - expect(page).to have_content 'Can run untagged jobs No' - expect(runner.reload.run_untagged?).to eq false + 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 |