Sha256: b54c18bdc20d486e834c3512b23cf9a02a68a67da31ef5d231515ab748d5011b

Contents?: true

Size: 818 Bytes

Versions: 32

Compression:

Stored size: 818 Bytes

Contents

# encoding: UTF-8
require 'test_helper'

# This tests the StandardMappings configuration class
class StandardMappingsTest < ActiveSupport::TestCase
  test 'should not raise exception on reconfiguring NdrImport::StandardMappings' do
    NdrImport::StandardMappings.mappings =
      YAML.load_file(SafePath.new('permanent_test_files').join('standard_mappings.yml'))
  end

  test 'should raise exception on setting non-hash standard mappings' do
    assert_raise ArgumentError do
      NdrImport::StandardMappings.mappings = true
    end
  end

  test 'should return mappings' do
    safe_path = SafePath.new('permanent_test_files').join('standard_mappings.yml')
    assert_instance_of Hash, NdrImport::StandardMappings.mappings
    assert_equal YAML.load_file(safe_path), NdrImport::StandardMappings.mappings
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
ndr_import-8.5.0 test/standard_mappings_test.rb
ndr_import-8.4.0 test/standard_mappings_test.rb
ndr_import-8.3.0 test/standard_mappings_test.rb
ndr_import-8.2.0 test/standard_mappings_test.rb
ndr_import-8.1.0 test/standard_mappings_test.rb
ndr_import-8.0.0 test/standard_mappings_test.rb
ndr_import-7.0.0 test/standard_mappings_test.rb
ndr_import-6.4.1 test/standard_mappings_test.rb
ndr_import-6.4.0 test/standard_mappings_test.rb
ndr_import-6.3.0 test/standard_mappings_test.rb
ndr_import-6.2.0 test/standard_mappings_test.rb
ndr_import-6.1.1 test/standard_mappings_test.rb
ndr_import-6.1.0 test/standard_mappings_test.rb
ndr_import-6.0.0 test/standard_mappings_test.rb
ndr_import-5.1.0 test/standard_mappings_test.rb
ndr_import-5.0.0 test/standard_mappings_test.rb
ndr_import-4.1.4 test/standard_mappings_test.rb
ndr_import-4.1.3 test/standard_mappings_test.rb
ndr_import-4.1.2 test/standard_mappings_test.rb
ndr_import-4.1.1 test/standard_mappings_test.rb