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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
4c45c106
Commit
4c45c106
authored
Feb 08, 2018
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't check against a hardcoded user name
and use an invalid user name that is random so we know it's invalid
parent
bb2478c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
qa/qa/specs/features/api/users_spec.rb
qa/qa/specs/features/api/users_spec.rb
+2
-2
No files found.
qa/qa/specs/features/api/users_spec.rb
View file @
4c45c106
...
@@ -14,7 +14,7 @@ module QA
...
@@ -14,7 +14,7 @@ module QA
end
end
scenario
'submit request with a valid user name'
do
scenario
'submit request with a valid user name'
do
get
request
.
url
,
{
params:
{
username:
'root'
}
}
get
request
.
url
,
{
params:
{
username:
Runtime
::
User
.
name
}
}
expect_status
(
200
)
expect_status
(
200
)
expect
(
json_body
).
to
be_an
Array
expect
(
json_body
).
to
be_an
Array
...
@@ -23,7 +23,7 @@ module QA
...
@@ -23,7 +23,7 @@ module QA
end
end
scenario
'submit request with an invalid user name'
do
scenario
'submit request with an invalid user name'
do
get
request
.
url
,
{
params:
{
username:
'invalid'
}
}
get
request
.
url
,
{
params:
{
username:
SecureRandom
.
hex
(
10
)
}
}
expect_status
(
200
)
expect_status
(
200
)
expect
(
json_body
).
to
be_an
Array
expect
(
json_body
).
to
be_an
Array
...
...
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