summaryrefslogtreecommitdiffstats
path: root/app/notification_test.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2018-02-12 12:56:46 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2018-02-13 09:57:23 -0500
commit3fef21e350737c235e6dfc2d9f35311d65290c3e (patch)
treec9dffab5215f785534b948513f7b335bec07c945 /app/notification_test.go
parentc1b49f8b77e0e75afcc6cf4dc0f1c36569824151 (diff)
downloadchat-3fef21e350737c235e6dfc2d9f35311d65290c3e.tar.gz
chat-3fef21e350737c235e6dfc2d9f35311d65290c3e.tar.bz2
chat-3fef21e350737c235e6dfc2d9f35311d65290c3e.zip
ICU-753 Added unit tests for messages with only push notifications
Diffstat (limited to 'app/notification_test.go')
-rw-r--r--app/notification_test.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/notification_test.go b/app/notification_test.go
index 2b7b260c4..cc501fbd0 100644
--- a/app/notification_test.go
+++ b/app/notification_test.go
@@ -1345,6 +1345,30 @@ func TestGetPushNotificationMessage(t *testing.T) {
ExpectedMessage: "user sent you a direct message",
ExpectedCategory: model.CATEGORY_CAN_REPLY,
},
+ "only files, public channel": {
+ HasFiles: true,
+ ChannelType: model.CHANNEL_OPEN,
+ ExpectedMessage: "user uploaded one or more files in channel",
+ ExpectedCategory: model.CATEGORY_CAN_REPLY,
+ },
+ "only files, private channel": {
+ HasFiles: true,
+ ChannelType: model.CHANNEL_PRIVATE,
+ ExpectedMessage: "user uploaded one or more files in channel",
+ ExpectedCategory: model.CATEGORY_CAN_REPLY,
+ },
+ "only files, group message channel": {
+ HasFiles: true,
+ ChannelType: model.CHANNEL_GROUP,
+ ExpectedMessage: "user uploaded one or more files in channel",
+ ExpectedCategory: model.CATEGORY_CAN_REPLY,
+ },
+ "only files, direct message channel": {
+ HasFiles: true,
+ ChannelType: model.CHANNEL_DIRECT,
+ ExpectedMessage: "user uploaded one or more files in a direct message",
+ ExpectedCategory: model.CATEGORY_CAN_REPLY,
+ },
} {
t.Run(name, func(t *testing.T) {
locale := tc.Locale