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.32 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.31 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.30 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.29 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.28 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.27 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.26 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.25 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.24 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.23 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.22 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.21 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.20 test/types/array_type_test.rb
sessionm-cassandra_object-2.7.5 test/types/array_type_test.rb
sessionm-cassandra_object-2.7.4 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.18 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.17 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.16 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.15 test/types/array_type_test.rb
sessionm-cassandra_object-4.0.14 test/types/array_type_test.rb