summaryrefslogtreecommitdiff
path: root/spec/services/users
diff options
context:
space:
mode:
authorEzekiel Kigbo <ekigbo@gitlab.com>2019-05-07 21:58:16 +0000
committerFatih Acet <acetfatih@gmail.com>2019-05-07 21:58:16 +0000
commit3ad6653b3e64ad81278cbbc24dacd15bd2d32e6f (patch)
treed481264c2003dd5f26da4f61da413d19db96c057 /spec/services/users
parent9d4450263fd7dc53dafd62389871d8b1fcea5e1a (diff)
downloadgitlab-ce-3ad6653b3e64ad81278cbbc24dacd15bd2d32e6f.tar.gz
Added user time settings fields to profile
Udpated user_edit_profile_spec with time preferences Minor update form fields
Diffstat (limited to 'spec/services/users')
-rw-r--r--spec/services/users/update_service_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/services/users/update_service_spec.rb b/spec/services/users/update_service_spec.rb
index e04c05418b0..9384287f98a 100644
--- a/spec/services/users/update_service_spec.rb
+++ b/spec/services/users/update_service_spec.rb
@@ -13,6 +13,15 @@ describe Users::UpdateService do
expect(user.name).to eq('New Name')
end
+ it 'updates time preferences' do
+ result = update_user(user, timezone: 'Europe/Warsaw', time_display_relative: true, time_format_in_24h: false)
+
+ expect(result).to eq(status: :success)
+ expect(user.reload.timezone).to eq('Europe/Warsaw')
+ expect(user.time_display_relative).to eq(true)
+ expect(user.time_format_in_24h).to eq(false)
+ end
+
it 'returns an error result when record cannot be updated' do
result = {}
expect do