diff options
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) } |