diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-05-05 13:20:33 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-05-19 23:01:53 +0300 |
commit | 2aa57071947e562f302b3858a249339024ef7119 (patch) | |
tree | d75c4ad7cda83efb1ecabd740713a23e611d6f4a /spec | |
parent | a8a205cd5c3f2840e7e8eab16bceff608c288f33 (diff) |
Extend runner config options for untagged jobs
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/runners_spec.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/features/runners_spec.rb b/spec/features/runners_spec.rb index 8edeb8d18af..4f942c3ab1c 100644 --- a/spec/features/runners_spec.rb +++ b/spec/features/runners_spec.rb @@ -110,4 +110,33 @@ describe "Runners" do expect(page).to have_content(@specific_runner.platform) end end + + feature 'configuring runners ability to picking untagged jobs' do + given(:project) { create(:empty_project) } + given(:runner) { create(:ci_runner) } + + background do + project.team << [user, :master] + project.runners << runner + end + + scenario 'user checks default configuration' do + visit namespace_project_runner_path(project.namespace, project, runner) + + 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 + + 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 |