Sha256: 913ea6c3587356110ff7fe853f18c685fac7cb888fb174f577e4ca5f9adb5e07

Contents?: true

Size: 626 Bytes

Versions: 16

Compression:

Stored size: 626 Bytes

Contents

require 'abstract_unit'

class CompositeArraysTest < ActiveSupport::TestCase

  def test_new_primary_keys
    keys = CompositePrimaryKeys::CompositeKeys.new
    assert_not_nil keys
    assert_equal '', keys.to_s
    assert_equal '', "#{keys}"
  end

  def test_initialize_primary_keys
    keys = CompositePrimaryKeys::CompositeKeys.new([1,2,3])
    assert_not_nil keys
    assert_equal '1,2,3', keys.to_s
    assert_equal '1,2,3', "#{keys}"
  end
  
  def test_to_composite_keys
    keys = [1,2,3].to_composite_keys
    assert_equal CompositePrimaryKeys::CompositeKeys, keys.class
    assert_equal '1,2,3', keys.to_s
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
composite_primary_keys-3.1.11 test/test_composite_arrays.rb
composite_primary_keys-4.0.0.beta7 test/test_composite_arrays.rb
composite_primary_keys-4.0.0.beta6 test/test_composite_arrays.rb
composite_primary_keys-4.0.0.beta5 test/test_composite_arrays.rb
composite_primary_keys-4.0.0.beta4 test/test_composite_arrays.rb
composite_primary_keys-4.0.0.beta3 test/test_composite_arrays.rb
composite_primary_keys-3.1.10 test/test_composite_arrays.rb
composite_primary_keys-4.0.0.beta2 test/test_composite_arrays.rb
composite_primary_keys-4.0.0.beta1 test/test_composite_arrays.rb
composite_primary_keys-3.1.9 test/test_composite_arrays.rb
composite_primary_keys-3.1.8 test/test_composite_arrays.rb
composite_primary_keys-3.1.7 test/test_composite_arrays.rb
composite_primary_keys-3.1.6 test/test_composite_arrays.rb
composite_primary_keys-3.1.5 test/test_composite_arrays.rb
composite_primary_keys-3.1.4 test/test_composite_arrays.rb
composite_primary_keys-3.1.2 test/test_composite_arrays.rb