diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/lib/api/entities/ci/job_request/dependency_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/lib/api/entities/ci/job_request/dependency_spec.rb')
-rw-r--r-- | spec/lib/api/entities/ci/job_request/dependency_spec.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/lib/api/entities/ci/job_request/dependency_spec.rb b/spec/lib/api/entities/ci/job_request/dependency_spec.rb index fa5f3da554c..bbeb864c2ee 100644 --- a/spec/lib/api/entities/ci/job_request/dependency_spec.rb +++ b/spec/lib/api/entities/ci/job_request/dependency_spec.rb @@ -3,8 +3,9 @@ require 'spec_helper' RSpec.describe API::Entities::Ci::JobRequest::Dependency do + let(:running_job) { create(:ci_build, :artifacts) } let(:job) { create(:ci_build, :artifacts) } - let(:entity) { described_class.new(job) } + let(:entity) { described_class.new(job, { running_job: running_job }) } subject { entity.as_json } @@ -16,8 +17,8 @@ RSpec.describe API::Entities::Ci::JobRequest::Dependency do expect(subject[:name]).to eq(job.name) end - it 'returns the dependency token' do - expect(subject[:token]).to eq(job.token) + it 'returns the token belonging to the running job' do + expect(subject[:token]).to eq(running_job.token) end it 'returns the dependency artifacts_file', :aggregate_failures do |