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
540877d0
Commit
540877d0
authored
Mar 01, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use dig rather than nested access
parent
1e290112
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
spec/graphql/features/authorization_spec.rb
spec/graphql/features/authorization_spec.rb
+2
-2
No files found.
spec/graphql/features/authorization_spec.rb
View file @
540877d0
...
...
@@ -241,7 +241,7 @@ RSpec.describe 'Gitlab::Graphql::Authorize' do
end
end
subject
{
result
[
'data'
][
'item'
].
first
}
subject
{
result
.
dig
(
'data'
,
'item'
,
0
)
}
include_examples
'authorization with a single permission'
end
...
...
@@ -286,7 +286,7 @@ RSpec.describe 'Gitlab::Graphql::Authorize' do
end
it
'renders the issues the user has access to'
do
issue_edges
=
result
[
'data'
][
'testProject'
][
'testIssues'
][
'edges'
]
issue_edges
=
result
.
dig
(
'data'
,
'testProject'
,
'testIssues'
,
'edges'
)
issue_ids
=
issue_edges
.
map
{
|
issue_edge
|
issue_edge
[
'node'
]
&
.
fetch
(
'id'
)
}
expect
(
issue_edges
.
size
).
to
eq
(
visible_issues
.
size
)
...
...
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