Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 16:16:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 16:16:36 +0300
commit311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch)
tree07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/support/shared_examples/requests/api/graphql/packages/package_details_shared_examples.rb
parent27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff)
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'spec/support/shared_examples/requests/api/graphql/packages/package_details_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/requests/api/graphql/packages/package_details_shared_examples.rb18
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/support/shared_examples/requests/api/graphql/packages/package_details_shared_examples.rb b/spec/support/shared_examples/requests/api/graphql/packages/package_details_shared_examples.rb
index 41a61ba5fd7..d576a5874fd 100644
--- a/spec/support/shared_examples/requests/api/graphql/packages/package_details_shared_examples.rb
+++ b/spec/support/shared_examples/requests/api/graphql/packages/package_details_shared_examples.rb
@@ -2,12 +2,26 @@
RSpec.shared_examples 'a package detail' do
it_behaves_like 'a working graphql query' do
- it 'matches the JSON schema' do
- expect(package_details).to match_schema('graphql/packages/package_details')
+ it_behaves_like 'matching the package details schema'
+ end
+
+ context 'with pipelines' do
+ let_it_be(:build_info1) { create(:package_build_info, :with_pipeline, package: package) }
+ let_it_be(:build_info2) { create(:package_build_info, :with_pipeline, package: package) }
+ let_it_be(:build_info3) { create(:package_build_info, :with_pipeline, package: package) }
+
+ it_behaves_like 'a working graphql query' do
+ it_behaves_like 'matching the package details schema'
end
end
end
+RSpec.shared_examples 'matching the package details schema' do
+ it 'matches the JSON schema' do
+ expect(package_details).to match_schema('graphql/packages/package_details')
+ end
+end
+
RSpec.shared_examples 'a package with files' do
it 'has the right amount of files' do
expect(package_files_response.length).to be(package.package_files.length)