Skip to content

Commit

Permalink
Feature: Add north dakota driving licence (faker-ruby#2149)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjaimem authored and droznyk committed Oct 23, 2020
1 parent f372c84 commit 20947a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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

0 comments on commit 20947a3

Please sign in to comment.