Add test for unregistered user state to InAppPaymentRecurringContextJobTest.

This commit is contained in:
Alex Hart
2025-03-18 15:16:26 -03:00
committed by Cody Henthorne
parent e3356163bf
commit ac4db23709

View File

@@ -77,6 +77,18 @@ class InAppPaymentRecurringContextJobTest {
}
}
@Test
fun `Given user is unregistered, when I run then I expect failure`() {
every { mockSignalStore.account.isRegistered } returns true
val iap = insertInAppPayment()
val job = InAppPaymentRecurringContextJob.create(iap)
val result = job.run()
assertThat(result.isFailure).isTrue()
}
@Test
fun `Given a CREATED IAP, when I onAdded, then I expect PENDING`() {
val iap = insertInAppPayment()