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
38c57132
Commit
38c57132
authored
May 06, 2021
by
Serena Fang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for user is not admin
parent
5f59629d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
ee/spec/requests/api/users_spec.rb
ee/spec/requests/api/users_spec.rb
+12
-0
No files found.
ee/spec/requests/api/users_spec.rb
View file @
38c57132
...
...
@@ -197,6 +197,12 @@ RSpec.describe API::Users do
expect
(
json_response
).
to
include
(
'plan'
=>
'ultimate'
,
'trial'
=>
true
)
end
end
it
'contains is_auditor parameter'
do
get
api
(
"/users/
#{
user
.
id
}
"
,
admin
)
expect
(
json_response
).
to
have_key
(
'is_auditor'
)
end
end
context
'and user has no plan'
do
...
...
@@ -215,6 +221,12 @@ RSpec.describe API::Users do
expect
(
json_response
).
not_to
have_key
(
'plan'
)
expect
(
json_response
).
not_to
have_key
(
'trial'
)
end
it
'does not contain is_auditor parameter'
do
get
api
(
"/users/
#{
user
.
id
}
"
,
user
)
expect
(
json_response
).
not_to
have_key
(
'is_auditor'
)
end
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