Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jhaven-stytch committed Jan 15, 2025
1 parent 33423ac commit d3aec2b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ internal class PasswordsImplTest {
@Test
fun `PasswordsImpl DiscoveryImpl resetByEmailStart delegates to api`() =
runBlocking {
every { mockPKCEPairManager.generateAndReturnPKCECodePair() } returns PKCECodePair("", "")
val mockkResponse = StytchResult.Success<BasicData>(mockk(relaxed = true))
coEvery { mockDiscoveryApi.resetByEmailStart(any(), any(), any(), any(), any(), any()) } returns
mockkResponse
Expand All @@ -266,6 +267,7 @@ internal class PasswordsImplTest {

@Test
fun `PasswordsImpl DiscoveryImpl resetByEmailStart with callback calls callback method`() {
every { mockPKCEPairManager.generateAndReturnPKCECodePair() } returns PKCECodePair("", "")
val mockkResponse = StytchResult.Success<BasicData>(mockk(relaxed = true))
coEvery { mockDiscoveryApi.resetByEmailStart(any(), any(), any(), any(), any(), any()) } returns mockkResponse
val mockCallback = spyk<(BaseResponse) -> Unit>()
Expand All @@ -276,6 +278,7 @@ internal class PasswordsImplTest {
@Test
fun `PasswordsImpl DiscoveryImpl resetByEmail delegates to api`() =
runBlocking {
every { mockPKCEPairManager.getPKCECodePair() } returns PKCECodePair("", "")
val mockkResponse =
StytchResult.Success<B2BPasswordDiscoveryResetByEmailResponseData>(
mockk(relaxed = true),
Expand All @@ -288,6 +291,7 @@ internal class PasswordsImplTest {

@Test
fun `PasswordsImpl DiscoveryImpl resetByEmail with callback calls callback method`() {
every { mockPKCEPairManager.getPKCECodePair() } returns PKCECodePair("", "")
val mockkResponse = StytchResult.Success<B2BPasswordDiscoveryResetByEmailResponseData>(mockk(relaxed = true))
coEvery { mockDiscoveryApi.resetByEmail(any(), any(), any()) } returns mockkResponse
val mockCallback = spyk<(B2BPasswordDiscoveryResetByEmailResponse) -> Unit>()
Expand Down

0 comments on commit d3aec2b

Please sign in to comment.