diff options
Diffstat (limited to 'spec/lib/gitlab/ci/pipeline/seed')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/seed/build_spec.rb | 13 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/seed/processable/resource_group_spec.rb (renamed from spec/lib/gitlab/ci/pipeline/seed/build/resource_group_spec.rb) | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb b/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb index cf020fc343c..0efc7484699 100644 --- a/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb @@ -383,14 +383,25 @@ RSpec.describe Gitlab::Ci::Pipeline::Seed::Build do end context 'when job is a bridge' do - let(:attributes) do + let(:base_attributes) do { name: 'rspec', ref: 'master', options: { trigger: 'my/project' }, scheduling_type: :stage } end + let(:attributes) { base_attributes } + it { is_expected.to be_a(::Ci::Bridge) } it { is_expected.to be_valid } + + context 'when job belongs to a resource group' do + let(:attributes) { base_attributes.merge(resource_group_key: 'iOS') } + + it 'returns a job with resource group' do + expect(subject.resource_group).not_to be_nil + expect(subject.resource_group.key).to eq('iOS') + end + end end it 'memoizes a resource object' do diff --git a/spec/lib/gitlab/ci/pipeline/seed/build/resource_group_spec.rb b/spec/lib/gitlab/ci/pipeline/seed/processable/resource_group_spec.rb index 8fcc242ba5f..b7260599de2 100644 --- a/spec/lib/gitlab/ci/pipeline/seed/build/resource_group_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/seed/processable/resource_group_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::Ci::Pipeline::Seed::Build::ResourceGroup do +RSpec.describe Gitlab::Ci::Pipeline::Seed::Processable::ResourceGroup do let_it_be(:project) { create(:project) } let(:job) { build(:ci_build, project: project) } let(:seed) { described_class.new(job, resource_group_key) } |