summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorAdam Hegyi <ahegyi@gitlab.com>2019-07-15 21:07:54 +0000
committerMayra Cabrera <mcabrera@gitlab.com>2019-07-15 21:07:54 +0000
commit4959d8fd4967e5769c8c81bf37e18ea13f607e2b (patch)
treec8983a05de4aca907d104106206e6987d3f61706 /spec/requests
parentd8f7017ab01333b51b823035b177446ec36259d8 (diff)
downloadgitlab-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.rb8
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 }