Sha256: 906368daebb6df484a0a90d27c9f5c916aedec50c214bba5af6917b1d6b4aa69

Contents?: true

Size: 538 Bytes

Versions: 18

Compression:

Stored size: 538 Bytes

Contents

require 'test_helper'

class Superstore::Types::BaseTypeTest < Superstore::Types::TestCase
  test 'default' do
    assert_equal nil, coder.default
    assert_equal '5', Superstore::Types::BaseType.new(default: '5').default
    assert_equal 5.object_id, Superstore::Types::BaseType.new(default: 5).default.object_id
  end

  test 'encode' do
    assert_equal '1', coder.encode(1)
    assert_equal '', coder.encode(nil)
    assert_equal '1', coder.encode('1')
  end

  test 'decode' do
    assert_equal 'abc', coder.decode('abc')
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
superstore-1.2.0 test/unit/types/base_type_test.rb
superstore-1.1.4 test/unit/types/base_type_test.rb
superstore-1.1.3 test/unit/types/base_type_test.rb
superstore-1.1.2 test/unit/types/base_type_test.rb
superstore-1.1.1 test/unit/types/base_type_test.rb
superstore-1.1.0 test/unit/types/base_type_test.rb
superstore-1.0.12 test/unit/types/base_type_test.rb
superstore-1.0.11 test/unit/types/base_type_test.rb
superstore-1.0.10 test/unit/types/base_type_test.rb
superstore-1.0.9 test/unit/types/base_type_test.rb
superstore-1.0.8 test/unit/types/base_type_test.rb
superstore-1.0.7 test/unit/types/base_type_test.rb
superstore-1.0.6 test/unit/types/base_type_test.rb
superstore-1.0.5 test/unit/types/base_type_test.rb
superstore-1.0.4 test/unit/types/base_type_test.rb
superstore-1.0.3 test/unit/types/base_type_test.rb
superstore-1.0.2 test/unit/types/base_type_test.rb
superstore-1.0.0 test/unit/types/base_type_test.rb