fix: update notification setting to clear selected email flags (#100)
* fix: update notification setting to clear selected email flags * test: fix spec
This commit is contained in:
parent
43e83a678d
commit
16f5c2c62d
@ -44,7 +44,7 @@ class AccountUser < ApplicationRecord
|
||||
|
||||
def create_notification_setting
|
||||
setting = user.notification_settings.new(account_id: account.id)
|
||||
setting.selected_email_flags = [:email_conversation_assignment]
|
||||
setting.selected_email_flags = []
|
||||
setting.selected_push_flags = [:push_conversation_assignment]
|
||||
setting.save!
|
||||
end
|
||||
|
||||
@ -13,7 +13,7 @@ RSpec.describe AccountUser do
|
||||
expect(account_user.user.notification_settings).not_to be_nil
|
||||
|
||||
expect(account_user.user.notification_settings.first.email_conversation_creation?).to be(false)
|
||||
expect(account_user.user.notification_settings.first.email_conversation_assignment?).to be(true)
|
||||
expect(account_user.user.notification_settings.first.email_conversation_assignment?).to be(false)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user