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

Feature: Add north dakota driving licence #2149

Merged
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions lib/locales/en/driving_license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ en:
north_carolina:
- '##########'
- '############'
north_dakota:
- '???######'
- '#########'
ohio:
- '?########'
- '??#######'
Expand Down
4 changes: 4 additions & 0 deletions test/faker/default/test_faker_driving_licence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ def test_usa_driving_licence_for_different_states
# When state Alaska is passed
licence_number = @tester.usa_driving_licence('alaska')
assert_match %r{[0-9]{6,7}}, licence_number

# When state North Dakota is passed
licence_number = @tester.usa_driving_licence('North Dakota')
assert_match %r{([A-Z]{3}[0-9]{6})|([0-9]{9})}, licence_number
end

def test_usa_driving_licence_with_faker_code
Expand Down