Commit ff622b94 authored by Rémy Coutable's avatar Rémy Coutable

Fix a too strict array-matching expectation

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent a7e6e2b4
......@@ -93,14 +93,9 @@ describe 'OpenID Connect requests' do
'groups' => anything
}))
expected_groups =
if Group.supports_nested_groups?
['group1', 'group2/group3', 'group2/group3/group4']
else
['group1', 'group2/group3']
end
expect(json_response['groups']).to match(array_including(expected_groups))
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment