diff options
author | Sean McGivern <sean@gitlab.com> | 2017-06-08 17:10:35 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-06-15 15:15:13 +0100 |
commit | e94c1028c1e829f899b0d0f56313cc62df6f9a0a (patch) | |
tree | d69f40f69e1ed69ce5c2c6d7fe2367ccca7cdce1 /spec/controllers | |
parent | f4b5fcbca100769b89e6b06e0df180012d16a7a8 (diff) | |
download | gitlab-ce-e94c1028c1e829f899b0d0f56313cc62df6f9a0a.tar.gz |
Deserialise existing custom notification settingsdeserialize-custom-notifications
Create a post-deployment migration to update all existing notification settings
with at least one custom level enabled to the new format. Also handle the same
conversion when updating settings, to catch any stragglers.
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/notification_settings_controller_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/notification_settings_controller_spec.rb b/spec/controllers/notification_settings_controller_spec.rb index c2d0970ef88..6b690407ce3 100644 --- a/spec/controllers/notification_settings_controller_spec.rb +++ b/spec/controllers/notification_settings_controller_spec.rb @@ -60,7 +60,7 @@ describe NotificationSettingsController do expect(notification_setting.level).to eq("custom") custom_events.each do |event, value| - expect(notification_setting.send(event)).to eq(value) + expect(notification_setting.event_enabled?(event)).to eq(value) end end end @@ -91,7 +91,7 @@ describe NotificationSettingsController do expect(notification_setting.level).to eq("custom") custom_events.each do |event, value| - expect(notification_setting.send(event)).to eq(value) + expect(notification_setting.event_enabled?(event)).to eq(value) end end end |