about summary refs log tree commit diff
path: root/spec/controllers
diff options
context:
space:
mode:
authorAtsushi Yamamoto <yamaatsushi927@gmail.com>2017-05-29 11:56:13 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-05-29 17:56:13 +0200
commit402c19a92475014e04df91eca759225f8a89d2ac (patch)
tree76262cf99e34295d2e9acae0ab7858ff2fdc2796 /spec/controllers
parentb5e89948441eb245a873260a87bfb49fb334aee1 (diff)
Add preference setting for delete toot modal (#3368)
* Set delete_modal preference to true by default
* Does not show confirmation modal if delete_modal is false
* Add ja translation for preference setting page
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/settings/preferences_controller_spec.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/controllers/settings/preferences_controller_spec.rb b/spec/controllers/settings/preferences_controller_spec.rb
index 38e43f211..60fa42302 100644
--- a/spec/controllers/settings/preferences_controller_spec.rb
+++ b/spec/controllers/settings/preferences_controller_spec.rb
@@ -28,12 +28,14 @@ describe Settings::PreferencesController do
 
     it 'updates user settings' do
       user.settings['boost_modal'] = false
+      user.settings['delete_modal'] = true
       user.settings['notification_emails'] = user.settings['notification_emails'].merge('follow' => false)
       user.settings['interactions'] = user.settings['interactions'].merge('must_be_follower' => true)
 
       put :update, params: {
         user: {
           setting_boost_modal: '1',
+          setting_delete_modal: '0',
           notification_emails: { follow: '1' },
           interactions: { must_be_follower: '0' },
         }
@@ -42,6 +44,7 @@ describe Settings::PreferencesController do
       expect(response).to redirect_to(settings_preferences_path)
       user.reload
       expect(user.settings['boost_modal']).to be true
+      expect(user.settings['delete_modal']).to be false
       expect(user.settings['notification_emails']['follow']).to be true
       expect(user.settings['interactions']['must_be_follower']).to be false
     end