Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't select a payment method if the user it has selected nothing (#… #1792

Merged
merged 5 commits into from
Nov 7, 2019
Merged

Conversation

0xdfgp
Copy link
Contributor

@0xdfgp 0xdfgp commented Nov 6, 2019

fixes #1676

@0xdfgp
Copy link
Contributor Author

0xdfgp commented Nov 6, 2019

I'll fix the test with the next commit

@@ -5,6 +5,7 @@ import com.stripe.android.model.PaymentMethodFixtures
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNull
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should come after import kotlin.test.assertNotNull

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!

Comment on lines 170 to 174
val paymentMethodsAdapter =
recyclerView.adapter as PaymentMethodsAdapter

paymentMethodsAdapter.selectedPaymentMethodId = paymentMethod.id
assertEquals(paymentMethod.id, paymentMethodsAdapter.selectedPaymentMethod?.id)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can delete these lines

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Michael. If I delete the assignment the test fails because the selected payment method is null

@mshafrir-stripe
Copy link
Collaborator

@ISD4N thanks for fixing this!

@0xdfgp
Copy link
Contributor Author

0xdfgp commented Nov 7, 2019

@mshafrir-stripe we need this patch to continue with the integration with Stripe. Do you need something else from me to be able to approve it?

Thanks!

@mshafrir-stripe mshafrir-stripe merged commit 06a9843 into stripe:master Nov 7, 2019
@0xdfgp 0xdfgp deleted the patch-1 branch November 7, 2019 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pressing Back (Hardware or Soft) selects a Payment Method on the PaymentMethodSelection Activity
2 participants