File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -373,3 +373,20 @@ testUserGroupMembersCount = do
373
373
resp. status `shouldMatchInt` 200
374
374
resp. json %. " page.0.membersCount" `shouldMatchInt` 2
375
375
resp. json %. " total" `shouldMatchInt` 1
376
+
377
+ testUserGroupRemovalOnDelete :: (HasCallStack ) => App ()
378
+ testUserGroupRemovalOnDelete = do
379
+ (alice, tid, [bob, charlie]) <- createTeam OwnDomain 3
380
+
381
+ bobId <- bob %. " id" & asString
382
+ charlieId <- charlie %. " id" & asString
383
+
384
+ ug <-
385
+ createUserGroup alice (object [" name" .= " none" , " members" .= [bobId, charlieId]])
386
+ >>= getJSON 200
387
+ gid <- ug %. " id" & asString
388
+ void $ deleteTeamMember tid alice bob >>= getBody 202
389
+
390
+ bindResponse (getUserGroup alice gid) $ \ resp -> do
391
+ resp. status `shouldMatchInt` 200
392
+ resp. json %. " members" `shouldMatch` [charlieId]
You can’t perform that action at this time.
0 commit comments