Sha256: 8eaa7ba093490614deade0a9ad2a5eb50d935d433d716e78c174389eda18e057
Contents?: true
Size: 808 Bytes
Versions: 4
Compression:
Stored size: 808 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb') class TestFakerCompany < Test::Unit::TestCase def setup @tester = Faker::Company end def test_ein assert @tester.ein.match(/\d\d-\d\d\d\d\d\d\d/) end def test_duns_number assert @tester.duns_number.match(/\d\d-\d\d\d-\d\d\d\d/) end def test_logo assert @tester.logo.match(%r{https://pigment.github.io/fake-logos/logos/medium/color/\d+\.png}) end def test_buzzword assert @tester.buzzword.match(/\w+\.?/) end def test_swedish_organisation_number org_no = @tester.swedish_organisation_number assert org_no.match(/\d{10}/) assert org_no[9] == @tester.send(:luhn_algorithm, org_no[0..8]).to_s end def test_profession assert @tester.profession.match(/[a-z ]+\.?/) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
faker-1.6.3 | test/test_faker_company.rb |
faker-1.6.2 | test/test_faker_company.rb |
faker-1.6.1 | test/test_faker_company.rb |
faker-1.6.0 | test/test_faker_company.rb |