@@ -559,6 +559,101 @@ var validMessages = []struct {
559
559
"topic" : "test-topic" ,
560
560
},
561
561
},
562
+ {
563
+ name : "AndroidNotificationPriorityMin" ,
564
+ req : & Message {
565
+ Android : & AndroidConfig {
566
+ Notification : & AndroidNotification {
567
+ Priority : PriorityMin ,
568
+ },
569
+ },
570
+ Topic : "test-topic" ,
571
+ },
572
+ want : map [string ]interface {}{
573
+ "android" : map [string ]interface {}{
574
+ "notification" : map [string ]interface {}{
575
+ "notification_priority" : "PRIORITY_MIN" ,
576
+ },
577
+ },
578
+ "topic" : "test-topic" ,
579
+ },
580
+ },
581
+ {
582
+ name : "AndroidNotificationPriorityLow" ,
583
+ req : & Message {
584
+ Android : & AndroidConfig {
585
+ Notification : & AndroidNotification {
586
+ Priority : PriorityLow ,
587
+ },
588
+ },
589
+ Topic : "test-topic" ,
590
+ },
591
+ want : map [string ]interface {}{
592
+ "android" : map [string ]interface {}{
593
+ "notification" : map [string ]interface {}{
594
+ "notification_priority" : "PRIORITY_LOW" ,
595
+ },
596
+ },
597
+ "topic" : "test-topic" ,
598
+ },
599
+ },
600
+ {
601
+ name : "AndroidNotificationPriorityDefault" ,
602
+ req : & Message {
603
+ Android : & AndroidConfig {
604
+ Notification : & AndroidNotification {
605
+ Priority : PriorityDefault ,
606
+ },
607
+ },
608
+ Topic : "test-topic" ,
609
+ },
610
+ want : map [string ]interface {}{
611
+ "android" : map [string ]interface {}{
612
+ "notification" : map [string ]interface {}{
613
+ "notification_priority" : "PRIORITY_DEFAULT" ,
614
+ },
615
+ },
616
+ "topic" : "test-topic" ,
617
+ },
618
+ },
619
+ {
620
+ name : "AndroidNotificationPriorityHigh" ,
621
+ req : & Message {
622
+ Android : & AndroidConfig {
623
+ Notification : & AndroidNotification {
624
+ Priority : PriorityHigh ,
625
+ },
626
+ },
627
+ Topic : "test-topic" ,
628
+ },
629
+ want : map [string ]interface {}{
630
+ "android" : map [string ]interface {}{
631
+ "notification" : map [string ]interface {}{
632
+ "notification_priority" : "PRIORITY_HIGH" ,
633
+ },
634
+ },
635
+ "topic" : "test-topic" ,
636
+ },
637
+ },
638
+ {
639
+ name : "AndroidNotificationPriorityMax" ,
640
+ req : & Message {
641
+ Android : & AndroidConfig {
642
+ Notification : & AndroidNotification {
643
+ Priority : PriorityMax ,
644
+ },
645
+ },
646
+ Topic : "test-topic" ,
647
+ },
648
+ want : map [string ]interface {}{
649
+ "android" : map [string ]interface {}{
650
+ "notification" : map [string ]interface {}{
651
+ "notification_priority" : "PRIORITY_MAX" ,
652
+ },
653
+ },
654
+ "topic" : "test-topic" ,
655
+ },
656
+ },
562
657
}
563
658
564
659
var invalidMessages = []struct {
0 commit comments