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>2022-05-19 10:33:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-19 10:33:21 +0300
commit36a59d088eca61b834191dacea009677a96c052f (patch)
treee4f33972dab5d8ef79e3944a9f403035fceea43f /spec/requests/api/graphql/query_spec.rb
parenta1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff)
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/requests/api/graphql/query_spec.rb')
-rw-r--r--spec/requests/api/graphql/query_spec.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/requests/api/graphql/query_spec.rb b/spec/requests/api/graphql/query_spec.rb
index d650acc8354..4aa9c4b8254 100644
--- a/spec/requests/api/graphql/query_spec.rb
+++ b/spec/requests/api/graphql/query_spec.rb
@@ -76,10 +76,8 @@ RSpec.describe 'Query' do
it_behaves_like 'a working graphql query'
it_behaves_like 'a query that needs authorization'
- context 'the current user is able to read designs' do
- it 'fetches the expected data' do
- expect(query_result).to eq('id' => global_id_of(version), 'sha' => version.sha)
- end
+ it 'fetches the expected data' do
+ expect(query_result).to match a_graphql_entity_for(version, :sha)
end
end
@@ -106,13 +104,13 @@ RSpec.describe 'Query' do
context 'the current user is able to read designs' do
it 'fetches the expected data, including the correct associations' do
- expect(query_result).to eq(
- 'id' => global_id_of(design_at_version),
+ expect(query_result).to match a_graphql_entity_for(
+ design_at_version,
'filename' => design_at_version.design.filename,
- 'version' => { 'id' => global_id_of(version), 'sha' => version.sha },
- 'design' => { 'id' => global_id_of(design) },
+ 'version' => a_graphql_entity_for(version, :sha),
+ 'design' => a_graphql_entity_for(design),
'issue' => { 'title' => issue.title, 'iid' => issue.iid.to_s },
- 'project' => { 'id' => global_id_of(project), 'fullPath' => project.full_path }
+ 'project' => a_graphql_entity_for(project, :full_path)
)
end
end