Commit d796e4fc authored by George Andrinopoulos's avatar George Andrinopoulos

Update api docs and minor changes

parent 19dda160
......@@ -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.
......
......@@ -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
......
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