Sha256: bdf2af60d2700b94daad579addc4dea0331788126065248f93b010df4ff1f0d8
Contents?: true
Size: 552 Bytes
Versions: 35
Compression:
Stored size: 552 Bytes
Contents
require 'test_helper' class CassandraObject::Types::JsonTypeTest < CassandraObject::Types::TestCase test 'encode' do assert_equal({a: 'b'}.to_json, coder.encode(a: 'b')) assert_equal '-3', coder.encode(-3) end test 'decode' do assert_equal({'a' => 'b'}, coder.decode({'a' => 'b'}.to_json)) end test 'encode array' do assert_equal(['a', 'b'].to_json, coder.encode(['a', 'b'])) assert_equal '-3', coder.encode(-3) end test 'decode array' do assert_equal(['a', 'b'], coder.decode(['a', 'b'].to_json)) end end
Version data entries
35 entries across 35 versions & 2 rubygems