Sha256: 48b77821e4efb271bbc24069713ea1eeb4096e8b12274dcc0a567ba74dd04c24

Contents?: true

Size: 429 Bytes

Versions: 9

Compression:

Stored size: 429 Bytes

Contents

require 'test_helper'

class CassandraObject::Types::ArrayTypeTest < CassandraObject::Types::TestCase
  test 'encode' do
    assert_equal ['1', '2'].to_json, coder.encode(['1', '2'])

    assert_raise ArgumentError do
      coder.encode('wtf')
    end
  end

  test 'decode' do
    assert_equal ['1', '2'], coder.decode(['1', '2'].to_json)
    assert_equal nil, coder.decode(nil)
    assert_equal nil, coder.decode('')
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gotime-cassandra_object-4.12.2 test/unit/types/array_type_test.rb
gotime-cassandra_object-4.12.1 test/unit/types/array_type_test.rb
gotime-cassandra_object-4.12.0 test/unit/types/array_type_test.rb
gotime-cassandra_object-4.11.6 test/unit/types/array_type_test.rb
gotime-cassandra_object-4.11.5 test/unit/types/array_type_test.rb
gotime-cassandra_object-4.11.4 test/unit/types/array_type_test.rb
gotime-cassandra_object-4.11.3 test/unit/types/array_type_test.rb
gotime-cassandra_object-4.11.2 test/unit/types/array_type_test.rb
gotime-cassandra_object-4.11.1 test/unit/types/array_type_test.rb