diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/models/ci/pipeline_artifact_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/models/ci/pipeline_artifact_spec.rb')
-rw-r--r-- | spec/models/ci/pipeline_artifact_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/ci/pipeline_artifact_spec.rb b/spec/models/ci/pipeline_artifact_spec.rb index b051f646bd4..3038cdc944b 100644 --- a/spec/models/ci/pipeline_artifact_spec.rb +++ b/spec/models/ci/pipeline_artifact_spec.rb @@ -227,6 +227,19 @@ RSpec.describe Ci::PipelineArtifact, type: :model do expect(subject.size).to eq(size) expect(subject.file_format).to eq(Ci::PipelineArtifact::REPORT_TYPES[file_type].to_s) expect(subject.expire_at).to eq(Ci::PipelineArtifact::EXPIRATION_DATE.from_now) + expect(subject.locked).to eq('unknown') + end + + it "creates a new pipeline artifact with pipeline's locked state" do + artifact = Ci::PipelineArtifact.create_or_replace_for_pipeline!( + pipeline: pipeline, + file_type: file_type, + file: file, + size: size, + locked: pipeline.locked + ) + + expect(artifact.locked).to eq(pipeline.locked) end end |