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
0d7047e7
Commit
0d7047e7
authored
Jul 06, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spec-Support: allow matchers to be used for mutation top-level errors
parent
a80d98b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
spec/support/shared_examples/graphql/mutation_shared_examples.rb
...pport/shared_examples/graphql/mutation_shared_examples.rb
+4
-2
No files found.
spec/support/shared_examples/graphql/mutation_shared_examples.rb
View file @
0d7047e7
...
...
@@ -7,13 +7,15 @@
#
# There must be a method or let called `mutation` defined that executes
# the mutation.
RSpec
.
shared_examples
'a mutation that returns top-level errors'
do
|
errors
:|
RSpec
.
shared_examples
'a mutation that returns top-level errors'
do
|
errors:
[]
|
let
(
:match_errors
)
{
eq
(
errors
)
}
it
do
post_graphql_mutation
(
mutation
,
current_user:
current_user
)
error_messages
=
graphql_errors
.
map
{
|
e
|
e
[
'message'
]
}
expect
(
error_messages
).
to
eq
(
errors
)
expect
(
error_messages
).
to
match_errors
end
end
...
...
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