Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
borichellow committed Apr 3, 2024
1 parent 44a7190 commit 9e90b2c
Showing 1 changed file with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1582,7 +1582,11 @@ class MLSConversationRepositoryTest {
val domain = "domain.com"
val handleWithSchemeAndDomain = "$scheme://%40$handle@$domain"
val groupId = Arrangement.GROUP_ID.value
val wireIdentity = WIRE_IDENTITY.copy(handle = WireIdentity.Handle.fromString(handleWithSchemeAndDomain, domain))
val wireIdentity = WIRE_IDENTITY.copy(
certificate = WIRE_IDENTITY.certificate!!.copy(
handle = WireIdentity.Handle.fromString(handleWithSchemeAndDomain, domain)
)
)
val (_, mlsConversationRepository) = Arrangement()
.withGetEstablishedSelfMLSGroupIdReturns(groupId)
.withGetMLSClientSuccessful()
Expand All @@ -1593,9 +1597,9 @@ class MLSConversationRepositoryTest {
// then
result.shouldSucceed() {
it.forEach {
assertEquals(scheme, it.handle.scheme)
assertEquals(handle, it.handle.handle)
assertEquals(domain, it.handle.domain)
assertEquals(scheme, it.certificate?.handle?.scheme)
assertEquals(handle, it.certificate?.handle?.handle)
assertEquals(domain, it.certificate?.handle?.domain)
}
}
}
Expand All @@ -1608,7 +1612,11 @@ class MLSConversationRepositoryTest {
val domain = "domain.com"
val handleWithSchemeAndDomain = "$scheme://%40$handle@$domain"
val groupId = Arrangement.GROUP_ID.value
val wireIdentity = WIRE_IDENTITY.copy(handle = WireIdentity.Handle.fromString(handleWithSchemeAndDomain, domain))
val wireIdentity = WIRE_IDENTITY.copy(
certificate = WIRE_IDENTITY.certificate!!.copy(
handle = WireIdentity.Handle.fromString(handleWithSchemeAndDomain, domain)
)
)
val (_, mlsConversationRepository) = Arrangement()
.withGetMLSGroupIdByConversationIdReturns(groupId)
.withGetMLSClientSuccessful()
Expand All @@ -1620,9 +1628,9 @@ class MLSConversationRepositoryTest {
result.shouldSucceed() {
it.values.forEach {
it.forEach {
assertEquals(scheme, it.handle.scheme)
assertEquals(handle, it.handle.handle)
assertEquals(domain, it.handle.domain)
assertEquals(scheme, it.certificate?.handle?.scheme)
assertEquals(handle, it.certificate?.handle?.handle)
assertEquals(domain, it.certificate?.handle?.domain)
}
}
}
Expand Down

0 comments on commit 9e90b2c

Please sign in to comment.