Sha256: 65a864f81c3af442001dd17d70a77c35df213417c0a8c4e99f511e47b77cd9f1

Contents?: true

Size: 660 Bytes

Versions: 27

Compression:

Stored size: 660 Bytes

Contents

require 'test_helper'

class CassandraObject::Types::BaseTypeTest < CassandraObject::Types::TestCase
  test 'default' do
    assert_equal 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

  test 'wrap' do
    object = Object.new
    assert_equal object, coder.wrap(nil, nil, object)
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
gotime-cassandra_object-4.12.2 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.12.1 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.12.0 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.11.6 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.11.5 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.11.4 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.11.3 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.11.2 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.11.1 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.11.0 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.10.5 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.10.4 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.10.3 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.10.2 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.10.1 test/unit/types/base_type_test.rb
cassandra_object_rails-0.0.1 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.10.0 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.9.2 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.9.1 test/unit/types/base_type_test.rb
gotime-cassandra_object-4.9.0 test/unit/types/base_type_test.rb