mirror of
https://github.com/bitwarden/android.git
synced 2025-02-03 21:51:03 +03:00
[PM-10905] Update JSON model to match API (#3913)
This commit is contained in:
parent
d1f21d3585
commit
190ba792a1
3 changed files with 0 additions and 17 deletions
|
@ -1,25 +1,16 @@
|
|||
package com.x8bit.bitwarden.data.auth.datasource.network.model
|
||||
|
||||
import kotlinx.serialization.Contextual
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import java.time.ZonedDateTime
|
||||
|
||||
/**
|
||||
* Response object returned when requesting organization domain SSO details.
|
||||
*
|
||||
* @property isSsoAvailable Whether or not SSO is available for this domain.
|
||||
* @property domainName The organization's domain name.
|
||||
* @property organizationIdentifier The organization's identifier.
|
||||
* @property isSsoRequired Whether or not SSO is required.
|
||||
* @property verifiedDate The date these details were verified.
|
||||
*/
|
||||
@Serializable
|
||||
data class OrganizationDomainSsoDetailsResponseJson(
|
||||
@SerialName("ssoAvailable") val isSsoAvailable: Boolean,
|
||||
@SerialName("domainName") val domainName: String,
|
||||
@SerialName("organizationIdentifier") val organizationIdentifier: String,
|
||||
@SerialName("ssoRequired") val isSsoRequired: Boolean,
|
||||
@Contextual
|
||||
@SerialName("verifiedDate") val verifiedDate: ZonedDateTime?,
|
||||
)
|
||||
|
|
|
@ -13,7 +13,6 @@ import org.junit.jupiter.api.Assertions.assertEquals
|
|||
import org.junit.jupiter.api.Assertions.assertTrue
|
||||
import org.junit.jupiter.api.Test
|
||||
import retrofit2.create
|
||||
import java.time.ZonedDateTime
|
||||
|
||||
class OrganizationServiceTest : BaseServiceTest() {
|
||||
private val authenticatedOrganizationApi: AuthenticatedOrganizationApi = retrofit.create()
|
||||
|
@ -131,9 +130,6 @@ private const val ORGANIZATION_DOMAIN_SSO_DETAILS_JSON = """
|
|||
private val ORGANIZATION_DOMAIN_SSO_BODY = OrganizationDomainSsoDetailsResponseJson(
|
||||
isSsoAvailable = true,
|
||||
organizationIdentifier = "Test Org",
|
||||
domainName = "bitwarden.com",
|
||||
isSsoRequired = false,
|
||||
verifiedDate = ZonedDateTime.parse("2024-09-13T00:00Z"),
|
||||
)
|
||||
|
||||
private const val ORGANIZATION_KEYS_JSON = """
|
||||
|
|
|
@ -142,7 +142,6 @@ import org.junit.jupiter.api.Assertions.assertNull
|
|||
import org.junit.jupiter.api.Assertions.assertTrue
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
import java.time.ZonedDateTime
|
||||
|
||||
@Suppress("LargeClass")
|
||||
class AuthRepositoryTest {
|
||||
|
@ -5149,9 +5148,6 @@ class AuthRepositoryTest {
|
|||
} returns OrganizationDomainSsoDetailsResponseJson(
|
||||
isSsoAvailable = true,
|
||||
organizationIdentifier = "Test Org",
|
||||
domainName = "bitwarden.com",
|
||||
isSsoRequired = false,
|
||||
verifiedDate = ZonedDateTime.parse("2024-09-13T00:00Z"),
|
||||
)
|
||||
.asSuccess()
|
||||
val result = repository.getOrganizationDomainSsoDetails(email)
|
||||
|
|
Loading…
Add table
Reference in a new issue