Sha256: c02ab31218ecdc93548cf7b7d4d2cb89f9b5c5c1794172056439e1dca1f15add

Contents?: true

Size: 656 Bytes

Versions: 61

Compression:

Stored size: 656 Bytes

Contents

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

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

61 entries across 61 versions & 1 rubygems

Version Path
composite_primary_keys-9.0.9 test/test_composite_arrays.rb
composite_primary_keys-11.0.0.rc2 test/test_composite_arrays.rb
composite_primary_keys-10.0.3 test/test_composite_arrays.rb
composite_primary_keys-11.0.0.rc1 test/test_composite_arrays.rb
composite_primary_keys-11.0.0.beta4 test/test_composite_arrays.rb
composite_primary_keys-11.0.0.beta3 test/test_composite_arrays.rb
composite_primary_keys-11.0.0.beta2 test/test_composite_arrays.rb
composite_primary_keys-11.0.0.beta1 test/test_composite_arrays.rb
composite_primary_keys-10.0.2 test/test_composite_arrays.rb
composite_primary_keys-10.0.1 test/test_composite_arrays.rb
composite_primary_keys-9.0.8 test/test_composite_arrays.rb
composite_primary_keys-10.0.0 test/test_composite_arrays.rb
composite_primary_keys-9.0.7 test/test_composite_arrays.rb
composite_primary_keys-8.1.6 test/test_composite_arrays.rb
composite_primary_keys-9.0.6 test/test_composite_arrays.rb
composite_primary_keys-9.0.5 test/test_composite_arrays.rb
composite_primary_keys-8.1.5 test/test_composite_arrays.rb
composite_primary_keys-9.0.4 test/test_composite_arrays.rb
composite_primary_keys-9.0.2 test/test_composite_arrays.rb
composite_primary_keys-9.0.1 test/test_composite_arrays.rb