From 16f5c2c62da3ec862ddaee7919e5b81b46762196 Mon Sep 17 00:00:00 2001 From: Gabriel Jablonski Date: Mon, 25 Aug 2025 18:11:29 -0300 Subject: [PATCH] fix: update notification setting to clear selected email flags (#100) * fix: update notification setting to clear selected email flags * test: fix spec --- app/models/account_user.rb | 2 +- spec/models/account_user_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/account_user.rb b/app/models/account_user.rb index bbcb0e010..b62978130 100644 --- a/app/models/account_user.rb +++ b/app/models/account_user.rb @@ -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 diff --git a/spec/models/account_user_spec.rb b/spec/models/account_user_spec.rb index e5a560fe9..b2348ca1e 100644 --- a/spec/models/account_user_spec.rb +++ b/spec/models/account_user_spec.rb @@ -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