-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Fix an argument for test_faker_stripe.rb #1702
Merged
vbrazo
merged 1 commit into
faker-ruby:master
from
koic:fix_an_argumnet_for_test_faker_stripe
Aug 24, 2019
Merged
Fix an argument for test_faker_stripe.rb #1702
vbrazo
merged 1 commit into
faker-ruby:master
from
koic:fix_an_argumnet_for_test_faker_stripe
Aug 24, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR fixes an argument for test_faker_stripe.rb. This change was hidden by the same `ArgumentError` in different messages. ## Expected error ```console Faker::Stripe.valid_card(card_type: Faker::Lorem.word) # => ArgumentError: Valid credit cards argument can be left blank or include # visa, visa_debit, mc, mc_2_series, mc_debit, mc_prepaid, amex, amex_2, # discover, discover_2, diners_club, diners_club_2, jcb # from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/faker-2.1.2/lib/faker/default/stripe.rb:13:in # `valid_card' ``` ```console Faker::Stripe.invalid_card(card_error: Faker::Lorem.word) # => ArgumentError: Invalid credit cards argument can be left blank or # include addressZipFail, addressFail, zipFail, addressZipUnavailable, # cvcFail, customerChargeFail, successWithReview, declineCard, # declineFraudulentCard, declineIncorrectCvc, declineExpired, # declineProcessingError, declineIncorrectNumber # from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/faker-2.1.2/lib/faker/default/stripe.rb:43:in # `invalid_card' ``` ## Actual error ```console Faker::Stripe.valid_card(Faker::Lorem.word) # => ArgumentError: wrong number of arguments (given 1, expected 0) # from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/faker-2.1.2/lib/faker/default/stripe.rb:6:in # `valid_card' ``` ```console Faker::Stripe.invalid_card(Faker::Lorem.word) # => ArgumentError: wrong number of arguments (given 1, expected 0) # from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/faker-2.1.2/lib/faker/default/stripe.rb:36:in # `invalid_card' ``` This was found by running the test with faker-ruby#1698. ```console % bundle exec rake test Loaded suite /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.1/lib/rake/rake_test_loader Started (snip) /Users/koic/src/github.com/faker-ruby/faker/test/faker/default/test_faker_stripe.rb:38: Passing `card_error` with the 1st argument of `Stripe.invalid_card` is deprecated. Use keyword argument like `Stripe.invalid_card(card_error: ...)` instead. /Users/koic/src/github.com/faker-ruby/faker/test/faker/default/test_faker_stripe.rb:16: Passing `card_type` with the 1st argument of `Stripe.valid_card` is deprecated. Use keyword argument like `Stripe.valid_card(card_type: ...)` instead. ```
vbrazo
approved these changes
Aug 24, 2019
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.
👍
michebble
pushed a commit
to michebble/faker
that referenced
this pull request
Feb 16, 2020
This PR fixes an argument for test_faker_stripe.rb. This change was hidden by the same `ArgumentError` in different messages. ## Expected error ```console Faker::Stripe.valid_card(card_type: Faker::Lorem.word) # => ArgumentError: Valid credit cards argument can be left blank or include # visa, visa_debit, mc, mc_2_series, mc_debit, mc_prepaid, amex, amex_2, # discover, discover_2, diners_club, diners_club_2, jcb # from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/faker-2.1.2/lib/faker/default/stripe.rb:13:in # `valid_card' ``` ```console Faker::Stripe.invalid_card(card_error: Faker::Lorem.word) # => ArgumentError: Invalid credit cards argument can be left blank or # include addressZipFail, addressFail, zipFail, addressZipUnavailable, # cvcFail, customerChargeFail, successWithReview, declineCard, # declineFraudulentCard, declineIncorrectCvc, declineExpired, # declineProcessingError, declineIncorrectNumber # from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/faker-2.1.2/lib/faker/default/stripe.rb:43:in # `invalid_card' ``` ## Actual error ```console Faker::Stripe.valid_card(Faker::Lorem.word) # => ArgumentError: wrong number of arguments (given 1, expected 0) # from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/faker-2.1.2/lib/faker/default/stripe.rb:6:in # `valid_card' ``` ```console Faker::Stripe.invalid_card(Faker::Lorem.word) # => ArgumentError: wrong number of arguments (given 1, expected 0) # from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/faker-2.1.2/lib/faker/default/stripe.rb:36:in # `invalid_card' ``` This was found by running the test with faker-ruby#1698. ```console % bundle exec rake test Loaded suite /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.1/lib/rake/rake_test_loader Started (snip) /Users/koic/src/github.com/faker-ruby/faker/test/faker/default/test_faker_stripe.rb:38: Passing `card_error` with the 1st argument of `Stripe.invalid_card` is deprecated. Use keyword argument like `Stripe.invalid_card(card_error: ...)` instead. /Users/koic/src/github.com/faker-ruby/faker/test/faker/default/test_faker_stripe.rb:16: Passing `card_type` with the 1st argument of `Stripe.valid_card` is deprecated. Use keyword argument like `Stripe.valid_card(card_type: ...)` instead. ```
davidmorton0
pushed a commit
to davidmorton0/faker
that referenced
this pull request
Jul 12, 2021
This PR fixes an argument for test_faker_stripe.rb. This change was hidden by the same `ArgumentError` in different messages. ## Expected error ```console Faker::Stripe.valid_card(card_type: Faker::Lorem.word) # => ArgumentError: Valid credit cards argument can be left blank or include # visa, visa_debit, mc, mc_2_series, mc_debit, mc_prepaid, amex, amex_2, # discover, discover_2, diners_club, diners_club_2, jcb # from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/faker-2.1.2/lib/faker/default/stripe.rb:13:in # `valid_card' ``` ```console Faker::Stripe.invalid_card(card_error: Faker::Lorem.word) # => ArgumentError: Invalid credit cards argument can be left blank or # include addressZipFail, addressFail, zipFail, addressZipUnavailable, # cvcFail, customerChargeFail, successWithReview, declineCard, # declineFraudulentCard, declineIncorrectCvc, declineExpired, # declineProcessingError, declineIncorrectNumber # from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/faker-2.1.2/lib/faker/default/stripe.rb:43:in # `invalid_card' ``` ## Actual error ```console Faker::Stripe.valid_card(Faker::Lorem.word) # => ArgumentError: wrong number of arguments (given 1, expected 0) # from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/faker-2.1.2/lib/faker/default/stripe.rb:6:in # `valid_card' ``` ```console Faker::Stripe.invalid_card(Faker::Lorem.word) # => ArgumentError: wrong number of arguments (given 1, expected 0) # from /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/faker-2.1.2/lib/faker/default/stripe.rb:36:in # `invalid_card' ``` This was found by running the test with faker-ruby#1698. ```console % bundle exec rake test Loaded suite /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.1/lib/rake/rake_test_loader Started (snip) /Users/koic/src/github.com/faker-ruby/faker/test/faker/default/test_faker_stripe.rb:38: Passing `card_error` with the 1st argument of `Stripe.invalid_card` is deprecated. Use keyword argument like `Stripe.invalid_card(card_error: ...)` instead. /Users/koic/src/github.com/faker-ruby/faker/test/faker/default/test_faker_stripe.rb:16: Passing `card_type` with the 1st argument of `Stripe.valid_card` is deprecated. Use keyword argument like `Stripe.valid_card(card_type: ...)` instead. ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes an argument for test_faker_stripe.rb.
This change was hidden by the same
ArgumentError
in different messages.Expected error
Actual error
This was found by running the test with #1698.