Sha256: e3c1e39a3df1482fced8b4fff2d1b875c44e1b0433d25b673e5fc544ebd58fd5

Contents?: true

Size: 551 Bytes

Versions: 21

Compression:

Stored size: 551 Bytes

Contents

require 'test_helper'

class CassandraObject::Types::BaseTypeTest < CassandraObject::Types::TestCase
  test 'default' do
    assert_nil coder.default
    assert_equal '5', CassandraObject::Types::BaseType.new(default: '5').default
    assert_equal 5.object_id, CassandraObject::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

21 entries across 21 versions & 1 rubygems

Version Path
extendi-cassandra_object-1.1.1 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.1.0 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.20 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.19 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.18 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.17 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.16 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.15 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.14 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.13 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.12 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.11 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.10 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.9 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.8 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.7 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.6 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.5 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.4 test/unit/types/base_type_test.rb
extendi-cassandra_object-1.0.1 test/unit/types/base_type_test.rb