Skip to content

Commit c44106c

Browse files
committed
test: add Platform to PushNotification tests for topic scenarios
- Add Platform field to PushNotification struct initialization in tests for topic and topic-plus-tokens scenarios Signed-off-by: appleboy <[email protected]>
1 parent 4ef067e commit c44106c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

notify/notification_fcm_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ func TestBuildFCMMessage(t *testing.T) {
433433

434434
func TestGetAndroidNotificationWithTopic(t *testing.T) {
435435
req := &PushNotification{
436+
Platform: core.PlatFormAndroid,
436437
Topic: "test-topic",
437438
Condition: "'dogs' in topics",
438439
Message: "Topic message",
@@ -459,9 +460,10 @@ func TestGetAndroidNotificationWithTokens(t *testing.T) {
459460

460461
func TestGetAndroidNotificationWithTopicAndTokens(t *testing.T) {
461462
req := &PushNotification{
462-
Topic: "test-topic",
463-
Tokens: []string{"token1", "token2"},
464-
Message: "Combined message",
463+
Platform: core.PlatFormAndroid,
464+
Topic: "test-topic",
465+
Tokens: []string{"token1", "token2"},
466+
Message: "Combined message",
465467
}
466468

467469
messages := GetAndroidNotification(req)

0 commit comments

Comments
 (0)