diff options
author | Mark Fletcher <mark@gitlab.com> | 2017-01-11 17:38:41 +0300 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2017-01-11 17:38:41 +0300 |
commit | 72c68b98ae5e016254e56afc60eb9fa662a452de (patch) | |
tree | 276a012abfe901debe7645a94d6b4fef7703237b /spec/requests/api/users_spec.rb | |
parent | 4404ea8662508c60f96e6730d9a45feb68498c28 (diff) |
Fix Users API to accept confirm parameter
Diffstat (limited to 'spec/requests/api/users_spec.rb')
-rw-r--r-- | spec/requests/api/users_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index 2c2e17eddb0..5bf5bf0739e 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -137,6 +137,15 @@ describe API::Users, api: true do expect(new_user.can_create_group).to eq(true) end + it "creates user with optional attributes" do + optional_attributes = { confirm: true } + attributes = attributes_for(:user).merge(optional_attributes) + + post api('/users', admin), attributes + + expect(response).to have_http_status(201) + end + it "creates non-admin user" do post api('/users', admin), attributes_for(:user, admin: false, can_create_group: false) expect(response).to have_http_status(201) |