Skip to content

Commit f7cd069

Browse files
committed
fix: enable user-group synced tests
1 parent aad7bca commit f7cd069

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

integration/test/Test/UserGroup.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ testUserGroupMembersCount = do
376376

377377
testUserGroupUpdateChannelsSucceeds :: (HasCallStack) => App ()
378378
testUserGroupUpdateChannelsSucceeds = do
379-
(alice, tid, [_bob]) <- createTeam OwnDomain 2
379+
(alice, tid, [bob]) <- createTeam OwnDomain 2
380380

381381
ug <-
382382
createUserGroup alice (object ["name" .= "none", "members" .= (mempty :: [String])])
@@ -390,14 +390,14 @@ testUserGroupUpdateChannelsSucceeds = do
390390
>>= objConvId
391391
updateUserGroupChannels alice gid ((.id_) <$> convIds) >>= assertSuccess
392392

393-
-- bobId <- asString $ bob %. "id"
393+
bobId <- asString $ bob %. "id"
394394
bindResponse (getUserGroupWithChannels alice gid) $ \resp -> do
395395
resp.status `shouldMatchInt` 200
396396
actual <- resp.json %. "channels" >>= asList >>= traverse objQid
397397
actual `shouldMatchSet` for convIds objQid
398398

399-
-- FUTUREWORK: check the actual associated channels
400-
-- resp.json %. "members" `shouldMatch` [bobId]
399+
resp.json %. "channels" `shouldMatch` map (\convId -> object ["id" .= convId.id_, "domain" .= convId.domain]) convIds
400+
resp.json %. "members" `shouldMatch` [bobId]
401401

402402
testUserGroupUpdateChannelsNonAdmin :: (HasCallStack) => App ()
403403
testUserGroupUpdateChannelsNonAdmin = do

0 commit comments

Comments
 (0)