-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Trans First Express: Don't pass blank name field #3133
Trans First Express: Don't pass blank name field #3133
Conversation
4f9a0bb
to
cd4dd48
Compare
credit_card = CreditCard.new(credit_card_opts) | ||
response = @gateway.purchase(@amount, credit_card, @options) | ||
assert_success response | ||
assert_equal 'Succeeded', response.message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth looking for the name being absent from the request? Or will the sandbox error if you send it blank
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be a unit test, alternatively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did manually test that, but probably a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added case to same test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I was thinking about verifying that the blank name field is not added to the request. But I wasn't sure if you needed to write that into the test necessarily, or if the sandbox would error in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. Yes, this was in response to the gateway throwing an error when the field was sent as an empty string, so the remote test should be inherently sufficient.
Remote (Failures probably due to changes to sandbox, relevant remote test does pass): 34 tests, 83 assertions, 9 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 71.875% passed Unit: 21 tests, 103 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
cd4dd48
to
3876a2e
Compare
Closes activemerchant#3133 Remote (Failures probably due to changes to sandbox, relevant remote test does pass): 34 tests, 83 assertions, 9 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 71.875% passed Unit: 21 tests, 103 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
Remote (Failures probably due to changes to sandbox, relevant remote
test does pass):
32 tests, 83 assertions, 9 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
71.875% passed
Unit:
21 tests, 103 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed