Sha256: 9ad29c9b461101bfe17de95c69f07c3b34e4b7eef91cb1d58d87b54b4a3d8544
Contents?: true
Size: 751 Bytes
Versions: 8
Compression:
Stored size: 751 Bytes
Contents
# encoding: utf-8 require 'helper' # Author Guapolo <github.com/guapolo> class TestIdentificationMX < Test::Unit::TestCase def test_rfc_persona_moral re = /\A[a-zñÑ&]{3}\d{2}[0-1][0-9][0-3][0-9][a-z0-9]{3}\z/i assert_match(re, Faker::IdentificationMX.rfc_persona_moral) end def test_rfc_persona_fisica re = /\A[a-zñÑ]{4}\d{2}[0-1][0-9][0-3][0-9][a-z0-9]{3}\z/i assert_match(re, Faker::IdentificationMX.rfc_persona_fisica) end def test_curp or_curp_states_abbr = Faker::IdentificationMX::ESTADOS_CURP.join("|") re = /\A[a-z][aeioux][a-z]{2}[0-9]{2}[0-1][0-9][0-3][0-9][hm]#{or_curp_states_abbr}[bcdfghjklmnñpqrstvwxyz]{3}[0-9a-z][0-9]\z/i assert_match(re, Faker::IdentificationMX.curp) end end
Version data entries
8 entries across 8 versions & 2 rubygems