diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/models/ci/runner_spec.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) | |
download | gitlab-ce-e8d2c2579383897a1dd7f9debd359abe8ae8373d.tar.gz |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/models/ci/runner_spec.rb')
-rw-r--r-- | spec/models/ci/runner_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/ci/runner_spec.rb b/spec/models/ci/runner_spec.rb index 61f80bd43b1..ffc8ab4cf8b 100644 --- a/spec/models/ci/runner_spec.rb +++ b/spec/models/ci/runner_spec.rb @@ -1086,6 +1086,18 @@ RSpec.describe Ci::Runner do expect(matchers.map(&:tag_list)).to match_array([%w[tag1 tag2], %w[tag3 tag4]]) end end + + context 'with runner_ids' do + before do + create_list(:ci_runner, 2) + end + + it 'includes runner_ids' do + expect(matchers.size).to eq(1) + + expect(matchers.first.runner_ids).to match_array(described_class.all.pluck(:id)) + end + end end describe '#runner_matcher' do @@ -1095,6 +1107,8 @@ RSpec.describe Ci::Runner do subject(:matcher) { runner.runner_matcher } + it { expect(matcher.runner_ids).to eq([runner.id]) } + it { expect(matcher.runner_type).to eq(runner.runner_type) } it { expect(matcher.public_projects_minutes_cost_factor).to eq(runner.public_projects_minutes_cost_factor) } |