Sha256: 9c5a9699df7aeead1737313335edf4ecc8d759018a9b4054f5eaa20e00da648a

Contents?: true

Size: 484 Bytes

Versions: 11

Compression:

Stored size: 484 Bytes

Contents

require 'test_helper'

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

    assert_raise ArgumentError do
      coder.encode('wtf')
    end
  end
  
  test 'decode' do
    assert_equal ['1', '2'], coder.decode(['1', '2'].to_set)
    assert_equal ['1', '2'], coder.decode(['1', '2'].to_json)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
gotime-cassandra_object-2.5.0 test/types/set_type_test.rb
gotime-cassandra_object-2.4.2 test/types/set_type_test.rb
gotime-cassandra_object-2.4.1 test/types/set_type_test.rb
gotime-cassandra_object-2.4.0 test/types/set_type_test.rb
gotime-cassandra_object-2.3.6 test/types/set_type_test.rb
gotime-cassandra_object-2.3.5 test/types/set_type_test.rb
gotime-cassandra_object-2.3.4 test/types/set_type_test.rb
gotime-cassandra_object-2.3.3 test/types/set_type_test.rb
gotime-cassandra_object-2.3.2 test/types/set_type_test.rb
gotime-cassandra_object-2.3.1 test/types/set_type_test.rb
gotime-cassandra_object-2.3.0 test/types/set_type_test.rb