diff --git a/app/src/test/java/org/thoughtcrime/securesms/jobs/InAppPaymentRecurringContextJobTest.kt b/app/src/test/java/org/thoughtcrime/securesms/jobs/InAppPaymentRecurringContextJobTest.kt index 747b5db685..55a5770fc3 100644 --- a/app/src/test/java/org/thoughtcrime/securesms/jobs/InAppPaymentRecurringContextJobTest.kt +++ b/app/src/test/java/org/thoughtcrime/securesms/jobs/InAppPaymentRecurringContextJobTest.kt @@ -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()