Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix an argument for test_faker_stripe.rb #1702

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions test/faker/default/test_faker_stripe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ def test_valid_card
end

def test_valid_card_error
assert_raise ArgumentError do
assert @tester.valid_card(Faker::Lorem.word)
e = assert_raise ArgumentError do
assert @tester.valid_card(card_type: Faker::Lorem.word)
end

assert_match(/\AValid credit cards argument can be left blank or include/, e.message)
end

def test_specific_valid_card
Expand All @@ -34,9 +36,11 @@ def test_invalid_card
end

def test_invalid_card_error
assert_raise ArgumentError do
assert @tester.invalid_card(Faker::Lorem.word)
e = assert_raise ArgumentError do
assert @tester.invalid_card(card_error: Faker::Lorem.word)
end

assert_match(/\AInvalid credit cards argument can be left blank or include/, e.message)
end

def test_specific_error_invalid_card
Expand Down