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
2d615c30
Commit
2d615c30
authored
Jul 03, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rebase and refactor user specs
parent
93044dec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+9
-0
No files found.
spec/requests/api/users_spec.rb
View file @
2d615c30
...
...
@@ -478,6 +478,7 @@ describe API::Users do
expect
(
response
).
to
have_http_status
(
200
)
expect
(
user
.
reload
.
password_expires_at
).
to
be
<=
Time
.
now
expect
(
AuditEvent
.
count
).
to
eq
(
1
)
end
it
"updates user with organization"
do
...
...
@@ -488,6 +489,14 @@ describe API::Users do
expect
(
user
.
reload
.
organization
).
to
eq
(
'GitLab'
)
end
it
'updates user with a new email'
do
put
api
(
"/users/
#{
user
.
id
}
"
,
admin
),
email:
'new@email.com'
expect
(
response
).
to
have_http_status
(
200
)
expect
(
user
.
reload
.
notification_email
).
to
eq
(
'new@email.com'
)
expect
(
AuditEvent
.
count
).
to
eq
(
1
)
end
it
'updates user with avatar'
do
put
api
(
"/users/
#{
user
.
id
}
"
,
admin
),
{
avatar:
fixture_file_upload
(
Rails
.
root
+
'spec/fixtures/banana_sample.gif'
,
'image/gif'
)
}
...
...
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