Sha256: 8f74b7a1bd9677b709aa1a91b990719fa098c3dbced80a87ad6deb846cc70bdb

Contents?: true

Size: 1015 Bytes

Versions: 1

Compression:

Stored size: 1015 Bytes

Contents

require 'helper'

class TestCsi < Minitest::Test
  should "find valid NAICS records" do
    naics_record = CSI::naics("928110")
    assert_equal "National Security", naics_record.name
    assert_equal ["9711"], naics_record.correlations
  end

  should "find valid SIC records" do
    sic_record = CSI::sic("8211")
    assert_equal "Elementary and Secondary Schools", sic_record.name
    assert_equal ["611110"], sic_record.correlations
  end

  should "find a record with multiple correlating records" do
    naics_record = CSI::naics("111339")
    assert_equal "Other Noncitrus Fruit Farming", naics_record.name
    assert_equal ["0175", "0179"], naics_record.correlations

    sic_record_1 = CSI::sic naics_record.correlations.first
    sic_record_2 = CSI::sic naics_record.correlations.last
    assert_equal "Deciduous Tree Fruits", sic_record_1.name
    assert_equal "Fruits and Tree Nuts, Not Elsewhere Classified", sic_record_2.name
    assert sic_record_1.correlations.include? naics_record.code
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
csi-0.3.3 test/test_csi.rb