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.2.44 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.43 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.42 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.41 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.40 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.39 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.38 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.37 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.36 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.35 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.34 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.33 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.32 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.31 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.30 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.29 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.28 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.27 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.26 test/types/array_type_test.rb
sessionm-cassandra_object-2.2.24 test/types/array_type_test.rb