summaryrefslogtreecommitdiff
path: root/spec/services/ci/find_exposed_artifacts_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/ci/find_exposed_artifacts_service_spec.rb')
-rw-r--r--spec/services/ci/find_exposed_artifacts_service_spec.rb58
1 files changed, 30 insertions, 28 deletions
diff --git a/spec/services/ci/find_exposed_artifacts_service_spec.rb b/spec/services/ci/find_exposed_artifacts_service_spec.rb
index 32d96471f16..6e11c153a75 100644
--- a/spec/services/ci/find_exposed_artifacts_service_spec.rb
+++ b/spec/services/ci/find_exposed_artifacts_service_spec.rb
@@ -157,20 +157,21 @@ RSpec.describe Ci::FindExposedArtifactsService do
subject { described_class.new(project, user).for_pipeline(pipeline, limit: 2) }
it 'returns first 2 results' do
- expect(subject).to eq([
- {
- text: 'artifact 1',
- url: file_project_job_artifacts_path(project, job1, 'ci_artifacts.txt'),
- job_name: job1.name,
- job_path: project_job_path(project, job1)
- },
- {
- text: 'artifact 2',
- url: browse_project_job_artifacts_path(project, job2),
- job_name: job2.name,
- job_path: project_job_path(project, job2)
- }
- ])
+ expect(subject).to eq(
+ [
+ {
+ text: 'artifact 1',
+ url: file_project_job_artifacts_path(project, job1, 'ci_artifacts.txt'),
+ job_name: job1.name,
+ job_path: project_job_path(project, job1)
+ },
+ {
+ text: 'artifact 2',
+ url: browse_project_job_artifacts_path(project, job2),
+ job_name: job2.name,
+ job_path: project_job_path(project, job2)
+ }
+ ])
end
end
@@ -199,20 +200,21 @@ RSpec.describe Ci::FindExposedArtifactsService do
subject { described_class.new(project, user).for_pipeline(pipeline, limit: 2) }
it 'returns the correct path for cross-project MRs' do
- expect(subject).to eq([
- {
- text: 'file artifact',
- url: file_project_job_artifacts_path(foreign_project, job_show, 'ci_artifacts.txt'),
- job_name: job_show.name,
- job_path: project_job_path(foreign_project, job_show)
- },
- {
- text: 'directory artifact',
- url: browse_project_job_artifacts_path(foreign_project, job_browse),
- job_name: job_browse.name,
- job_path: project_job_path(foreign_project, job_browse)
- }
- ])
+ expect(subject).to eq(
+ [
+ {
+ text: 'file artifact',
+ url: file_project_job_artifacts_path(foreign_project, job_show, 'ci_artifacts.txt'),
+ job_name: job_show.name,
+ job_path: project_job_path(foreign_project, job_show)
+ },
+ {
+ text: 'directory artifact',
+ url: browse_project_job_artifacts_path(foreign_project, job_browse),
+ job_name: job_browse.name,
+ job_path: project_job_path(foreign_project, job_browse)
+ }
+ ])
end
end
end