diff options
Diffstat (limited to 'spec/models/ci/pipeline_artifact_spec.rb')
-rw-r--r-- | spec/models/ci/pipeline_artifact_spec.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/spec/models/ci/pipeline_artifact_spec.rb b/spec/models/ci/pipeline_artifact_spec.rb index eb89c7af208..1cb99ec22b9 100644 --- a/spec/models/ci/pipeline_artifact_spec.rb +++ b/spec/models/ci/pipeline_artifact_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Ci::PipelineArtifact, type: :model do +RSpec.describe Ci::PipelineArtifact, type: :model, feature_category: :build_artifacts do let(:coverage_report) { create(:ci_pipeline_artifact, :with_coverage_report) } describe 'associations' do @@ -309,4 +309,19 @@ RSpec.describe Ci::PipelineArtifact, type: :model do let!(:model) { create(:ci_pipeline_artifact, project: parent) } end end + + describe 'partitioning', :ci_partitionable do + include Ci::PartitioningHelpers + + let(:pipeline) { create(:ci_pipeline) } + let(:pipeline_artifact) { create(:ci_pipeline_artifact, pipeline: pipeline) } + + before do + stub_current_partition_id + end + + it 'assigns the same partition id as the one that pipeline has' do + expect(pipeline_artifact.partition_id).to eq(ci_testing_partition_id) + end + end end |