mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-24 03:35:58 +00:00
Add test for unregistered user state to InAppPaymentRecurringContextJobTest.
This commit is contained in:
committed by
Cody Henthorne
parent
e3356163bf
commit
ac4db23709
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user