Update api docs and minor changes

This commit is contained in:
George Andrinopoulos 2017-02-02 17:15:02 +02:00
parent 19dda1606b
commit d796e4fc37
2 changed files with 4 additions and 2 deletions

View File

@ -271,6 +271,7 @@ Parameters:
- `can_create_group` (optional) - User can create groups - true or false
- `external` (optional) - Flags the user as external - true or false(default)
On password update, user will be forced to change it upon next login.
Note, at the moment this method does only return a `404` error,
even in cases where a `409` (Conflict) would be more appropriate,
e.g. when renaming the email address to some existing one.

View File

@ -306,9 +306,10 @@ describe API::Users, api: true do
end
it "updates user with new password and forces reset on next login" do
put api("/users/#{user.id}", admin), { password: '12345678' }
put api("/users/#{user.id}", admin), password: '12345678'
expect(response).to have_http_status(200)
expect(user.reload.password_expires_at).to be < Time.now
expect(user.reload.password_expires_at).to be <= Time.now
end
it "updates user with organization" do