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
539b3a35
Commit
539b3a35
authored
Feb 13, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a too strict array-matching expectation
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
e7595c10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
spec/requests/openid_connect_spec.rb
spec/requests/openid_connect_spec.rb
+7
-8
No files found.
spec/requests/openid_connect_spec.rb
View file @
539b3a35
...
...
@@ -81,7 +81,7 @@ describe 'OpenID Connect requests' do
it
'includes all user information and group memberships'
do
request_user_info
expect
(
json_response
).
to
eq
({
expect
(
json_response
).
to
match
(
a_hash_including
({
'sub'
=>
hashed_subject
,
'name'
=>
'Alice'
,
'nickname'
=>
'alice'
,
...
...
@@ -90,13 +90,12 @@ describe 'OpenID Connect requests' do
'website'
=>
'https://example.com'
,
'profile'
=>
'http://localhost/alice'
,
'picture'
=>
"http://localhost/uploads/-/system/user/avatar/
#{
user
.
id
}
/dk.png"
,
'groups'
=>
if
Group
.
supports_nested_groups?
[
'group1'
,
'group2/group3'
,
'group2/group3/group4'
]
else
[
'group1'
,
'group2/group3'
]
end
})
'groups'
=>
anything
}))
expected_groups
=
%w[group1 group2/group3]
expected_groups
<<
'group2/group3/group4'
if
Group
.
supports_nested_groups?
expect
(
json_response
[
'groups'
]).
to
match_array
(
expected_groups
)
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