diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-11 13:03:40 +0300 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-31 11:46:19 +0300 |
commit | ab489d293d6ee3e30673817ce4652c7b413988c0 (patch) | |
tree | e197ccd80fefd1f4ae610e96efeebf139c69b302 /spec/features/runners_spec.rb | |
parent | ec1d3e104afddf7c8a5f6f5d8bf1ffee99a8f551 (diff) |
Improve runner_type validations for Ci::Runner
Diffstat (limited to 'spec/features/runners_spec.rb')
-rw-r--r-- | spec/features/runners_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/features/runners_spec.rb b/spec/features/runners_spec.rb index e0cd963fe39..f905e6d4f5e 100644 --- a/spec/features/runners_spec.rb +++ b/spec/features/runners_spec.rb @@ -28,8 +28,8 @@ feature 'Runners' do project.add_master(user) end - context 'when a specific runner is activated on the project' do - given(:specific_runner) { create(:ci_runner, :specific) } + context 'when a project_type runner is activated on the project' do + given(:specific_runner) { create(:ci_runner, :project) } background do project.runners << specific_runner @@ -114,7 +114,7 @@ feature 'Runners' do end context 'when a shared runner is activated on the project' do - given!(:shared_runner) { create(:ci_runner, :shared) } + given!(:shared_runner) { create(:ci_runner, :instance) } scenario 'user sees CI/CD setting page' do visit project_runners_path(project) @@ -126,7 +126,7 @@ feature 'Runners' do context 'when a specific runner exists in another project' do given(:another_project) { create(:project) } - given(:specific_runner) { create(:ci_runner, :specific) } + given(:specific_runner) { create(:ci_runner, :project) } background do another_project.add_master(user) @@ -220,8 +220,8 @@ feature 'Runners' do end context 'project with a group but no group runner' do - given(:group) { create :group } - given(:project) { create :project, group: group } + given(:group) { create(:group) } + given(:project) { create(:project, group: group) } scenario 'group runners are not available' do visit project_runners_path(project) @@ -234,9 +234,9 @@ feature 'Runners' do end context 'project with a group and a group runner' do - given(:group) { create :group } - given(:project) { create :project, group: group } - given!(:ci_runner) { create :ci_runner, groups: [group], description: 'group-runner' } + given(:group) { create(:group) } + given(:project) { create(:project, group: group) } + given!(:ci_runner) { create(:ci_runner, :group, groups: [group], description: 'group-runner') } scenario 'group runners are available' do visit project_runners_path(project) @@ -263,7 +263,7 @@ feature 'Runners' do end context 'group runners in group settings' do - given(:group) { create :group } + given(:group) { create(:group) } background do group.add_master(user) end @@ -277,7 +277,7 @@ feature 'Runners' do end context 'group with a runner' do - let!(:runner) { create :ci_runner, groups: [group], description: 'group-runner' } + let!(:runner) { create(:ci_runner, :group, groups: [group], description: 'group-runner') } scenario 'the runner is visible' do visit group_settings_ci_cd_path(group) |