Add notification policies and notification requests (#29366)
This commit is contained in:
parent
653ce43abe
commit
50b17f7e10
104 changed files with 1096 additions and 247 deletions
|
@ -24,14 +24,13 @@ describe Settings::Preferences::NotificationsController do
|
|||
|
||||
describe 'PUT #update' do
|
||||
it 'updates notifications settings' do
|
||||
user.settings.update('notification_emails.follow': false, 'interactions.must_be_follower': true)
|
||||
user.settings.update('notification_emails.follow': false)
|
||||
user.save
|
||||
|
||||
put :update, params: {
|
||||
user: {
|
||||
settings_attributes: {
|
||||
'notification_emails.follow': '1',
|
||||
'interactions.must_be_follower': '0',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -39,7 +38,6 @@ describe Settings::Preferences::NotificationsController do
|
|||
expect(response).to redirect_to(settings_preferences_notifications_path)
|
||||
user.reload
|
||||
expect(user.settings['notification_emails.follow']).to be true
|
||||
expect(user.settings['interactions.must_be_follower']).to be false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue