Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wkal-pubnub committed Sep 30, 2024
1 parent ca6dd9d commit 6c01fcf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class ChannelIntegrationTest : BaseChatIntegrationTest() {

@Test
fun shouldReturnNoUserSuggestions_whenNoDatInCacheAndNoChannelsInChat() = runTest {
val userSuggestions = channel01.getUserSuggestions("sas@las").await()
val userSuggestions = channel01.getUserSuggestions("las").await()
assertEquals(0, userSuggestions.size)
}

Expand All @@ -303,15 +303,15 @@ class ChannelIntegrationTest : BaseChatIntegrationTest() {
channel01.invite(someUser).await()

// when no data in cache
val userSuggestionsMemberships: Set<Membership> = channel01.getUserSuggestions("sas@$userName").await()
val userSuggestionsMemberships: Set<Membership> = channel01.getUserSuggestions(userName).await()

// then
assertEquals(1, userSuggestionsMemberships.size)
assertEquals(someUser.id, userSuggestionsMemberships.first().user.id)
assertEquals(userName, userSuggestionsMemberships.first().user.name)

// when data in cache
val userSuggestionsMembershipsFromCache: Set<Membership> = channel01.getUserSuggestions("sas@$userName").await()
val userSuggestionsMembershipsFromCache: Set<Membership> = channel01.getUserSuggestions(userName).await()

// then
assertEquals(1, userSuggestionsMembershipsFromCache.size)
Expand Down

0 comments on commit 6c01fcf

Please sign in to comment.