Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8c1c513f
Commit
8c1c513f
authored
Mar 04, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only read the query file once
parent
21bb66e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
spec/requests/api/graphql/snippets_spec.rb
spec/requests/api/graphql/snippets_spec.rb
+3
-3
No files found.
spec/requests/api/graphql/snippets_spec.rb
View file @
8c1c513f
...
...
@@ -25,7 +25,7 @@ RSpec.describe 'snippets' do
describe
'snippet_blob_content'
do
let_it_be
(
:query_file
)
do
Rails
.
root
.
join
(
'app/graphql/queries/snippet/snippet_blob_content.query.graphql'
)
Rails
.
root
.
join
(
'app/graphql/queries/snippet/snippet_blob_content.query.graphql'
)
.
read
end
it
'can query for rich snippet blob content'
do
...
...
@@ -36,7 +36,7 @@ RSpec.describe 'snippets' do
ids:
ids
}
post_graphql
(
query_file
.
read
,
current_user:
current_user
,
variables:
vars
)
post_graphql
(
query_file
,
current_user:
current_user
,
variables:
vars
)
expect
(
graphql_data_at
(
:snippets
,
:nodes
,
:blobs
,
:nodes
,
:path
))
.
to
contain_exactly
(
'.gitattributes'
,
'.gitattributes'
,
'.gitattributes'
)
...
...
@@ -50,7 +50,7 @@ RSpec.describe 'snippets' do
ids:
ids
}
post_graphql
(
query_file
.
read
,
current_user:
current_user
,
variables:
vars
)
post_graphql
(
query_file
,
current_user:
current_user
,
variables:
vars
)
expect
(
graphql_data_at
(
:snippets
,
:nodes
,
:blobs
,
:nodes
,
:path
))
.
to
contain_exactly
(
'.gitattributes'
,
'.gitattributes'
,
'.gitattributes'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment