mirror of
https://github.com/bitwarden/android.git
synced 2026-11-19 17:40:12 -06:00
Add 'isPremium' boolean to account info (#278)
This commit is contained in:
committed by
Álison Fernandes
parent
636600114b
commit
acfc39ae3c
+7
-4
@@ -96,6 +96,7 @@ class UserStateJsonExtensionsTest {
|
||||
name = "activeName",
|
||||
email = "activeEmail",
|
||||
avatarColorHex = "activeAvatarColorHex",
|
||||
isPremium = false,
|
||||
isVaultUnlocked = true,
|
||||
),
|
||||
),
|
||||
@@ -104,11 +105,12 @@ class UserStateJsonExtensionsTest {
|
||||
activeUserId = "activeUserId",
|
||||
accounts = mapOf(
|
||||
"activeUserId" to AccountJson(
|
||||
profile = mockk() {
|
||||
profile = mockk {
|
||||
every { userId } returns "activeUserId"
|
||||
every { name } returns "activeName"
|
||||
every { email } returns "activeEmail"
|
||||
every { avatarColorHex } returns "activeAvatarColorHex"
|
||||
every { hasPremium } returns null
|
||||
},
|
||||
tokens = mockk(),
|
||||
settings = mockk(),
|
||||
@@ -134,6 +136,7 @@ class UserStateJsonExtensionsTest {
|
||||
name = "activeName",
|
||||
email = "activeEmail",
|
||||
avatarColorHex = "activeAvatarColorHex",
|
||||
isPremium = true,
|
||||
isVaultUnlocked = false,
|
||||
),
|
||||
),
|
||||
@@ -142,18 +145,18 @@ class UserStateJsonExtensionsTest {
|
||||
activeUserId = "activeUserId",
|
||||
accounts = mapOf(
|
||||
"activeUserId" to AccountJson(
|
||||
profile = mockk() {
|
||||
profile = mockk {
|
||||
every { userId } returns "activeUserId"
|
||||
every { name } returns "activeName"
|
||||
every { email } returns "activeEmail"
|
||||
every { avatarColorHex } returns "activeAvatarColorHex"
|
||||
every { hasPremium } returns true
|
||||
},
|
||||
tokens = mockk(),
|
||||
settings = mockk(),
|
||||
),
|
||||
),
|
||||
|
||||
)
|
||||
)
|
||||
.toUserState(
|
||||
vaultState = VaultState(
|
||||
unlockedVaultUserIds = emptySet(),
|
||||
|
||||
+1
@@ -229,6 +229,7 @@ private val DEFAULT_USER_STATE = UserState(
|
||||
name = "Active User",
|
||||
email = "active@bitwarden.com",
|
||||
avatarColorHex = "#aa00aa",
|
||||
isPremium = true,
|
||||
isVaultUnlocked = true,
|
||||
),
|
||||
),
|
||||
|
||||
+2
@@ -33,6 +33,7 @@ class RootNavViewModelTest : BaseViewModelTest() {
|
||||
name = "name",
|
||||
email = "email",
|
||||
avatarColorHex = "avatarColorHex",
|
||||
isPremium = true,
|
||||
isVaultUnlocked = true,
|
||||
),
|
||||
),
|
||||
@@ -53,6 +54,7 @@ class RootNavViewModelTest : BaseViewModelTest() {
|
||||
name = "name",
|
||||
email = "email",
|
||||
avatarColorHex = "avatarColorHex",
|
||||
isPremium = true,
|
||||
isVaultUnlocked = false,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -65,6 +65,7 @@ class VaultViewModelTest : BaseViewModelTest() {
|
||||
name = "Other User",
|
||||
email = "active@bitwarden.com",
|
||||
avatarColorHex = "#00aaaa",
|
||||
isPremium = true,
|
||||
isVaultUnlocked = true,
|
||||
),
|
||||
),
|
||||
@@ -356,6 +357,7 @@ private val DEFAULT_USER_STATE = UserState(
|
||||
name = "Active User",
|
||||
email = "active@bitwarden.com",
|
||||
avatarColorHex = "#aa00aa",
|
||||
isPremium = true,
|
||||
isVaultUnlocked = true,
|
||||
),
|
||||
),
|
||||
|
||||
+7
@@ -40,6 +40,7 @@ class UserStateExtensionsTest {
|
||||
name = "activeName",
|
||||
email = "activeEmail",
|
||||
avatarColorHex = "activeAvatarColorHex",
|
||||
isPremium = true,
|
||||
isVaultUnlocked = true,
|
||||
),
|
||||
UserState.Account(
|
||||
@@ -47,6 +48,7 @@ class UserStateExtensionsTest {
|
||||
name = "lockedName",
|
||||
email = "lockedEmail",
|
||||
avatarColorHex = "lockedAvatarColorHex",
|
||||
isPremium = false,
|
||||
isVaultUnlocked = false,
|
||||
),
|
||||
UserState.Account(
|
||||
@@ -54,6 +56,7 @@ class UserStateExtensionsTest {
|
||||
name = "unlockedName",
|
||||
email = "unlockedEmail",
|
||||
avatarColorHex = "unlockedAvatarColorHex",
|
||||
isPremium = true,
|
||||
isVaultUnlocked = true,
|
||||
),
|
||||
),
|
||||
@@ -77,6 +80,7 @@ class UserStateExtensionsTest {
|
||||
name = "name",
|
||||
email = "email",
|
||||
avatarColorHex = "avatarColorHex",
|
||||
isPremium = true,
|
||||
isVaultUnlocked = true,
|
||||
)
|
||||
.toAccountSummary(isActive = true),
|
||||
@@ -98,6 +102,7 @@ class UserStateExtensionsTest {
|
||||
name = "name",
|
||||
email = "email",
|
||||
avatarColorHex = "avatarColorHex",
|
||||
isPremium = false,
|
||||
isVaultUnlocked = false,
|
||||
)
|
||||
.toAccountSummary(isActive = false),
|
||||
@@ -119,6 +124,7 @@ class UserStateExtensionsTest {
|
||||
name = "name",
|
||||
email = "email",
|
||||
avatarColorHex = "avatarColorHex",
|
||||
isPremium = true,
|
||||
isVaultUnlocked = true,
|
||||
)
|
||||
.toAccountSummary(isActive = false),
|
||||
@@ -144,6 +150,7 @@ class UserStateExtensionsTest {
|
||||
name = "name",
|
||||
email = "email",
|
||||
avatarColorHex = "avatarColorHex",
|
||||
isPremium = true,
|
||||
isVaultUnlocked = true,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user