Sha256: ab7b21229222b42648f631e59a28df79bdc556739ea8cb3063eba1c4fef8687c
Contents?: true
Size: 543 Bytes
Versions: 8
Compression:
Stored size: 543 Bytes
Contents
require 'test_helper' class Superstore::Types::IntegerTypeTest < Superstore::Types::TestCase if Superstore::Base.adapter.class.name == 'Superstore::Adapters::CassandraAdapter' test 'encode' do assert_equal '3', type.encode(3) assert_equal '-3', type.encode(-3) assert_raise ArgumentError do type.encode('xx') end end end test 'decode' do assert_nil type.decode('') assert_equal 0, type.decode('abc') assert_equal 3, type.decode('3') assert_equal -3, type.decode('-3') end end
Version data entries
8 entries across 8 versions & 1 rubygems