Skip to content

Commit

Permalink
More fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaynewstrom-stripe committed Oct 25, 2024
1 parent c37f4f8 commit 7a136a5
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import com.stripe.android.utils.TestUtils
import com.stripe.android.utils.injectableActivityScenario
import org.junit.After
import org.junit.runner.RunWith
import org.mockito.kotlin.doReturn
import org.mockito.kotlin.mock
import org.mockito.kotlin.stub
import org.robolectric.RobolectricTestRunner
import kotlin.test.Test
import kotlin.test.assertIs
Expand Down Expand Up @@ -51,10 +53,14 @@ class Stripe3ds2TransactionActivityTest {

@Test
fun `fragmentFactory should be a ChallengeProgressFragmentFactory`() {
val viewModel = mock<Stripe3ds2TransactionViewModel>()
viewModel.stub {
onBlocking { viewModel.start3ds2Flow() } doReturn NextStep.Complete(PaymentFlowResult.Unvalidated())
}
injectableActivityScenario<Stripe3ds2TransactionActivity> {
injectActivity {
viewModelFactory =
TestUtils.viewModelFactoryFor(mock<Stripe3ds2TransactionViewModel>())
TestUtils.viewModelFactoryFor(viewModel)
}
}.launch(
Intent(
Expand Down

0 comments on commit 7a136a5

Please sign in to comment.