From 20947a3f7c7cee0b33c2abc61bfaaa814b2fa05c Mon Sep 17 00:00:00 2001 From: Martin Jaime <50113670+martinjaimem@users.noreply.github.com> Date: Fri, 9 Oct 2020 21:29:31 -0300 Subject: [PATCH] Feature: Add north dakota driving licence (#2149) --- lib/locales/en/driving_license.yml | 3 +++ test/faker/default/test_faker_driving_licence.rb | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/lib/locales/en/driving_license.yml b/lib/locales/en/driving_license.yml index fc668f6f8e..982a6cb5ab 100644 --- a/lib/locales/en/driving_license.yml +++ b/lib/locales/en/driving_license.yml @@ -115,6 +115,9 @@ en: north_carolina: - '##########' - '############' + north_dakota: + - '???######' + - '#########' ohio: - '?########' - '??#######' diff --git a/test/faker/default/test_faker_driving_licence.rb b/test/faker/default/test_faker_driving_licence.rb index a67b7cc7b3..6d40e094df 100644 --- a/test/faker/default/test_faker_driving_licence.rb +++ b/test/faker/default/test_faker_driving_licence.rb @@ -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