summaryrefslogtreecommitdiffstats
path: root/app/notification_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/notification_test.go')
-rw-r--r--app/notification_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/notification_test.go b/app/notification_test.go
index 5fc1d152c..05574eb08 100644
--- a/app/notification_test.go
+++ b/app/notification_test.go
@@ -783,6 +783,14 @@ func TestDoesNotifyPropsAllowPushNotification(t *testing.T) {
if DoesNotifyPropsAllowPushNotification(user, channelNotifyProps, post, true) {
t.Fatal("Should have returned false")
}
+
+ // WHEN default is ALL and channel is MUTED
+ userNotifyProps[model.PUSH_NOTIFY_PROP] = model.USER_NOTIFY_ALL
+ user.NotifyProps = userNotifyProps
+ channelNotifyProps[model.MARK_UNREAD_NOTIFY_PROP] = model.CHANNEL_MARK_UNREAD_MENTION
+ if DoesNotifyPropsAllowPushNotification(user, channelNotifyProps, post, false) {
+ t.Fatal("Should have returned false")
+ }
}
func TestDoesStatusAllowPushNotification(t *testing.T) {