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-4.0.13 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.12 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.11 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.10 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.9 test/types/array_type_test.rb
sessionm-cassandra_object-2.7.3 test/types/array_type_test.rb
sessionm-cassandra_object-2.7.2 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.8 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.7 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.6 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.5 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.4 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.3 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.2 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.1 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.0 test/types/array_type_test.rb
sessionm-cassandra_object-2.7.1 test/types/array_type_test.rb
sessionm-cassandra_object-2.7.0 test/types/array_type_test.rb
sessionm-cassandra_object-2.6.1 test/types/array_type_test.rb
sessionm-cassandra_object-2.6.0 test/types/array_type_test.rb