Sha256: 3f53ca00f27b85d0957f35d463c7d48926033234d449e158646f09dc04bd39c5

Contents?: true

Size: 430 Bytes

Versions: 117

Compression:

Stored size: 430 Bytes

Contents

require 'test_helper'

class CassandraObject::Types::ArrayTypeTest < CassandraObject::TestCase
  test 'encode' do
    assert_equal ['1', '2'].to_json, CassandraObject::Types::ArrayType.encode(['1', '2'])
    
    assert_raise ArgumentError do
      CassandraObject::Types::ArrayType.encode('wtf')
    end
  end

  test 'decode' do
    assert_equal ['1', '2'], CassandraObject::Types::ArrayType.decode(['1', '2'].to_json)
  end
end

Version data entries

117 entries across 117 versions & 2 rubygems

Version Path
sessionm-cassandra_object-2.5.9 test/types/array_type_test.rb
sessionm-cassandra_object-2.5.8 test/types/array_type_test.rb
sessionm-cassandra_object-2.5.7 test/types/array_type_test.rb
sessionm-cassandra_object-2.5.6 test/types/array_type_test.rb
sessionm-cassandra_object-2.5.5 test/types/array_type_test.rb
sessionm-cassandra_object-2.5.4 test/types/array_type_test.rb
sessionm-cassandra_object-2.5.3 test/types/array_type_test.rb
sessionm-cassandra_object-2.5.2 test/types/array_type_test.rb
sessionm-cassandra_object-2.5.1 test/types/array_type_test.rb
sessionm-cassandra_object-2.5.0 test/types/array_type_test.rb
sessionm-cassandra_object-2.4.9 test/types/array_type_test.rb
sessionm-cassandra_object-2.4.8 test/types/array_type_test.rb
sessionm-cassandra_object-2.4.7 test/types/array_type_test.rb
sessionm-cassandra_object-2.4.6 test/types/array_type_test.rb
sessionm-cassandra_object-2.4.5 test/types/array_type_test.rb
sessionm-cassandra_object-2.4.4 test/types/array_type_test.rb
sessionm-cassandra_object-2.4.3 test/types/array_type_test.rb
sessionm-cassandra_object-2.4.2 test/types/array_type_test.rb
sessionm-cassandra_object-2.4.1 test/types/array_type_test.rb
sessionm-cassandra_object-2.4.0 test/types/array_type_test.rb