Skip to content

Commit

Permalink
add: unit test for external_limited
Browse files Browse the repository at this point in the history
  • Loading branch information
bamo committed Oct 6, 2024
1 parent 8ca536c commit 1181e47
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions conversation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,27 @@ func TestInviteSharedToConversation(t *testing.T) {
t.Error("is legacy shared channel should be false")
}
})

t.Run("external_limited", func(t *testing.T) {
userIDs := []string{"UXXXXXXX1", "UXXXXXXX2"}
externalLimited := true
inviteID, isLegacySharedChannel, err := api.InviteSharedToConversation(InviteSharedToConversationParams{
ChannelID: "CXXXXXXXX",
UserIDs: userIDs,
ExternalLimited: &externalLimited,
})
if err != nil {
t.Errorf("Unexpected error: %s", err)
return
}
if inviteID == "" {
t.Error("invite id should have a value")
return
}
if isLegacySharedChannel {
t.Error("is legacy shared channel should be false")
}
})
}

func TestKickUserFromConversation(t *testing.T) {
Expand Down

0 comments on commit 1181e47

Please sign in to comment.