Sha256: 0101bb0c391e8b5193cefb6f0edcf32f83a3af40192ca141d49b7ea630e796ac

Contents?: true

Size: 654 Bytes

Versions: 20

Compression:

Stored size: 654 Bytes

Contents

require File.expand_path('../abstract_unit', __FILE__)

class TestAliases < ActiveSupport::TestCase
  fixtures :reference_codes

  def test_primary_key_setter_alias_composite_key
    reference_code = ReferenceCodeUsingCompositeKeyAlias.find([1, 2])
    assert_equal 'MRS', reference_code.code_label
    assert_equal 'Mrs', reference_code.abbreviation
  end

  def test_primary_key_setter_alias_simple_key
    reference_code = ReferenceCodeUsingSimpleKeyAlias.find('MRS')
    assert_equal 1, reference_code.reference_type_id
    assert_equal 2, reference_code.reference_code
    assert_equal 'Mrs', reference_code.abbreviation
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
composite_primary_keys-12.0.2 test/test_aliases.rb
composite_primary_keys-11.3.1 test/test_aliases.rb
composite_primary_keys-8.1.8 test/test_aliases.rb
composite_primary_keys-12.0.1 test/test_aliases.rb
composite_primary_keys-12.0.0 test/test_aliases.rb
composite_primary_keys-12.0.0.rc5 test/test_aliases.rb
composite_primary_keys-12.0.0.rc4 test/test_aliases.rb
composite_primary_keys-12.0.0.rc3 test/test_aliases.rb
composite_primary_keys-12.0.0.rc2 test/test_aliases.rb
composite_primary_keys-12.0.0.rc1 test/test_aliases.rb
composite_primary_keys-8.1.7 test/test_aliases.rb
composite_primary_keys-11.2.0 test/test_aliases.rb
composite_primary_keys-11.1.0 test/test_aliases.rb
composite_primary_keys-11.0.3 test/test_aliases.rb
composite_primary_keys-11.0.2 test/test_aliases.rb
composite_primary_keys-10.0.5 test/test_aliases.rb
composite_primary_keys-9.0.10 test/test_aliases.rb
composite_primary_keys-11.0.1 test/test_aliases.rb
composite_primary_keys-11.0.0 test/test_aliases.rb
composite_primary_keys-10.0.4 test/test_aliases.rb