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

Test the Vehicle VIN validator with known good and bad values, fixes … #2640

Merged
merged 5 commits into from
Jan 24, 2023
Merged
Changes from 3 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
7 changes: 4 additions & 3 deletions test/faker/default/test_faker_vehicle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ def test_vin
end

def test_vin_validity
100.times do
assert valid_vin(@tester.vin)
end
assert valid_vin('11111111111111111') # known valid test string
assert valid_vin('FAKERGEM5FAKERGEM') # valid checksum
refute valid_vin('ABCDEFG1234567890') # invalid checksum
100.times { assert valid_vin(@tester.vin) }
stefannibrasil marked this conversation as resolved.
Show resolved Hide resolved
alextaujenis marked this conversation as resolved.
Show resolved Hide resolved
end

def test_manufacture
Expand Down