diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /spec/lib/gitlab/data_builder/archive_trace_spec.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) | |
download | gitlab-ce-edaa33dee2ff2f7ea3fac488d41558eb5f86d68c.tar.gz |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'spec/lib/gitlab/data_builder/archive_trace_spec.rb')
-rw-r--r-- | spec/lib/gitlab/data_builder/archive_trace_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/lib/gitlab/data_builder/archive_trace_spec.rb b/spec/lib/gitlab/data_builder/archive_trace_spec.rb new file mode 100644 index 00000000000..a310b0f0a94 --- /dev/null +++ b/spec/lib/gitlab/data_builder/archive_trace_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Gitlab::DataBuilder::ArchiveTrace do + let_it_be(:build) { create(:ci_build, :trace_artifact) } + + describe '.build' do + let(:data) { described_class.build(build) } + + it 'has correct attributes', :aggregate_failures do + expect(data[:object_kind]).to eq 'archive_trace' + expect(data[:trace_url]).to eq build.job_artifacts_trace.file.url + expect(data[:build_id]).to eq build.id + expect(data[:pipeline_id]).to eq build.pipeline_id + expect(data[:project]).to eq build.project.hook_attrs + end + end +end |