diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /spec/helpers/ci/runners_helper_spec.rb | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'spec/helpers/ci/runners_helper_spec.rb')
-rw-r--r-- | spec/helpers/ci/runners_helper_spec.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/spec/helpers/ci/runners_helper_spec.rb b/spec/helpers/ci/runners_helper_spec.rb index 0f15f8be0a9..49ea2ac8d3b 100644 --- a/spec/helpers/ci/runners_helper_spec.rb +++ b/spec/helpers/ci/runners_helper_spec.rb @@ -83,7 +83,7 @@ RSpec.describe Ci::RunnersHelper do data = group_shared_runners_settings_data(group) expect(data[:update_path]).to eq("/api/v4/groups/#{group.id}") - expect(data[:shared_runners_availability]).to eq('disabled_and_unoverridable') + expect(data[:shared_runners_availability]).to eq(Namespace::SR_DISABLED_AND_UNOVERRIDABLE) expect(data[:parent_shared_runners_availability]).to eq('enabled') end end @@ -137,16 +137,15 @@ RSpec.describe Ci::RunnersHelper do using RSpec::Parameterized::TableSyntax where(:shared_runners_setting, :is_disabled_and_unoverridable) do - 'enabled' | "false" - 'disabled_with_override' | "false" - 'disabled_and_unoverridable' | "true" + :shared_runners_enabled | "false" + :disabled_with_override | "false" + :disabled_and_unoverridable | "true" end with_them do it 'returns the override runner status for project with group' do - group = create(:group) - project = create(:project, group: group) - allow(group).to receive(:shared_runners_setting).and_return(shared_runners_setting) + group = create(:group, shared_runners_setting) + project = create(:project, group: group, shared_runners_enabled: false) data = helper.toggle_shared_runners_settings_data(project) expect(data[:is_disabled_and_unoverridable]).to eq(is_disabled_and_unoverridable) |