diff options
author | Adam Hegyi <ahegyi@gitlab.com> | 2019-07-15 21:07:54 +0000 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-07-15 21:07:54 +0000 |
commit | 4959d8fd4967e5769c8c81bf37e18ea13f607e2b (patch) | |
tree | c8983a05de4aca907d104106206e6987d3f61706 /spec/requests | |
parent | d8f7017ab01333b51b823035b177446ec36259d8 (diff) | |
download | gitlab-ce-4959d8fd4967e5769c8c81bf37e18ea13f607e2b.tar.gz |
Migrate null values for users.private_profile
- Background migration for changing null values to false
- Set false as default value for private_profile DB column
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/users_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index 46925daf40a..0ad50e5347a 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -745,6 +745,14 @@ describe API::Users do expect(user.reload.private_profile).to eq(true) end + it "updates private profile when nil is given to false" do + admin.update(private_profile: true) + + put api("/users/#{user.id}", admin), params: { private_profile: nil } + + expect(user.reload.private_profile).to eq(false) + end + it "does not update admin status" do put api("/users/#{admin_user.id}", admin), params: { can_create_group: false } |