Skip to content

Commit

Permalink
chore: merge develop and adr adj
Browse files Browse the repository at this point in the history
  • Loading branch information
yamilmedina committed Aug 13, 2024
1 parent e4762cf commit 4cd14be
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
package com.wire.android.ui.userprofile.common

import com.wire.android.framework.TestUser.OTHER_USER
import com.wire.android.ui.userprofile.common.UsernameMapper.fromOtherUser
import com.wire.kalium.logic.data.user.OtherUser
import com.wire.kalium.logic.data.user.type.UserType
import kotlinx.datetime.Clock
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.EnumSource
import kotlin.time.Duration.Companion.hours

class UsernameMapperTest {

@Test
fun `given a guest temporary user, should map the handle as hours left`() {
val expected = "22h"
val result = fromOtherUser(
OTHER_USER.copy(
userType = UserType.GUEST,
expiresAt = Clock.System.now().plus(22.hours)
)
)
assertEquals(expected, result)
}

@ParameterizedTest
@EnumSource(TestParams::class)
fun `should map other user to its username - handle accordingly`(params: TestParams) {
Expand Down

This file was deleted.

0 comments on commit 4cd14be

Please sign in to comment.