-
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 Faker::Vehicle.vin #2562
Fix Faker::Vehicle.vin #2562
Conversation
- Dashes aren't permitted in VINs. - This is a partial revert and fix of d113aab - See faker-ruby@d113aab#r83976559
264f0c6
to
d808a8d
Compare
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.
@rmm5t Thank you!
What do you think of adding the following in the test_vin_validity
?
100.times { refute_match(/[^a-zA-Z\d]/, @tester.vin) }
or a simpler check that refutes non-alphanumeric characters. I feel like this could help us catch any issues like this in the future.
@stefannibrasil Sure thing. I added |
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.
Awesome, thank you so much for improving the tests so we can catch those details 👍
@rmm5t ahhh, I wasn't aware of these restrictions. Thank you! |
* Fix Faker::Vehicle.vin - Dashes aren't permitted in VINs. - This is a partial revert and fix of d113aab - See faker-ruby@d113aab#r83976559 * Improved Faker::Vehicle.vin validity test
Summary
/cc @koic @stefannibrasil