@@ -29,6 +29,7 @@ func TestCreateNotificationGroup(t *testing.T) {
2929
3030 respJSON , _ := json .Marshal (map [string ]any {
3131 "id" : "3JwREyrZGQ9" ,
32+ "type" : "group" ,
3233 "name" : notificationGroup .Name ,
3334 "notificationLevel" : notificationGroup .NotificationLevel ,
3435 "childNotificationGroupIds" : notificationGroup .ChildNotificationGroupIDs ,
@@ -66,6 +67,7 @@ func TestCreateNotificationGroup(t *testing.T) {
6667
6768 want := & NotificationGroup {
6869 ID : "3JwREyrZGQ9" ,
70+ Type : NotificationGroupTypeGroup ,
6971 Name : param .Name ,
7072 NotificationLevel : param .NotificationLevel ,
7173 ChildNotificationGroupIDs : param .ChildNotificationGroupIDs ,
@@ -92,20 +94,23 @@ func TestFindNotificationGroups(t *testing.T) {
9294 "notificationGroups" : {
9395 {
9496 "id" : "3Ja3HG3bTwq" ,
97+ "type" : "group-default" ,
9598 "name" : "Default" ,
9699 "notificationLevel" : "all" ,
97100 "childNotificationGroupIDs" : []string {},
98101 "childChannelIDs" : []string {"3Ja3HG3VTaA" },
99102 },
100103 {
101104 "id" : "3UJaU9eREvw" ,
105+ "type" : "group" ,
102106 "name" : "Notification Group #01" ,
103107 "notificationLevel" : "all" ,
104108 "childNotificationGroupIds" : []string {"3Tdq1pz9aLm" },
105109 "childChannelIds" : []string {},
106110 },
107111 {
108112 "id" : "3Tdq1pz9aLm" ,
113+ "type" : "group" ,
109114 "name" : "Notification Group #02" ,
110115 "notificationLevel" : "critical" ,
111116 "childNotificationGroupIds" : []string {},
@@ -135,20 +140,23 @@ func TestFindNotificationGroups(t *testing.T) {
135140 want := []* NotificationGroup {
136141 {
137142 ID : "3Ja3HG3bTwq" ,
143+ Type : NotificationGroupTypeGroupDefault ,
138144 Name : "Default" ,
139145 NotificationLevel : NotificationLevelAll ,
140146 ChildNotificationGroupIDs : []string {},
141147 ChildChannelIDs : []string {"3Ja3HG3VTaA" },
142148 },
143149 {
144150 ID : "3UJaU9eREvw" ,
151+ Type : NotificationGroupTypeGroup ,
145152 Name : "Notification Group #01" ,
146153 NotificationLevel : NotificationLevelAll ,
147154 ChildNotificationGroupIDs : []string {"3Tdq1pz9aLm" },
148155 ChildChannelIDs : []string {},
149156 },
150157 {
151158 ID : "3Tdq1pz9aLm" ,
159+ Type : NotificationGroupTypeGroup ,
152160 Name : "Notification Group #02" ,
153161 NotificationLevel : NotificationLevelCritical ,
154162 ChildNotificationGroupIDs : []string {},
@@ -186,6 +194,7 @@ func TestUpdateNotificationGroup(t *testing.T) {
186194
187195 respJSON , _ := json .Marshal (map [string ]any {
188196 "id" : id ,
197+ "type" : "group" ,
189198 "name" : notificationGroup .Name ,
190199 "notificationLevel" : notificationGroup .NotificationLevel ,
191200 "childNotificationGroupIds" : notificationGroup .ChildNotificationGroupIDs ,
@@ -223,6 +232,7 @@ func TestUpdateNotificationGroup(t *testing.T) {
223232
224233 want := & NotificationGroup {
225234 ID : id ,
235+ Type : NotificationGroupTypeGroup ,
226236 Name : param .Name ,
227237 NotificationLevel : param .NotificationLevel ,
228238 ChildNotificationGroupIDs : param .ChildNotificationGroupIDs ,
@@ -248,6 +258,7 @@ func TestDeleteNotificationGroup(t *testing.T) {
248258
249259 respJSON , _ := json .Marshal (map [string ]any {
250260 "id" : id ,
261+ "type" : "group" ,
251262 "name" : "My Notification Group" ,
252263 "notificationLevel" : "all" ,
253264 "childNotificationGroupIds" : []string {},
@@ -274,6 +285,7 @@ func TestDeleteNotificationGroup(t *testing.T) {
274285
275286 want := & NotificationGroup {
276287 ID : id ,
288+ Type : NotificationGroupTypeGroup ,
277289 Name : "My Notification Group" ,
278290 NotificationLevel : NotificationLevelAll ,
279291 ChildNotificationGroupIDs : []string {},
0 commit comments