Class: TC_Conversion

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
Postgres::Conversion
Defined in:
lib/postgres-pr/typeconv/TC_conv.rb

Instance Method Summary collapse

Methods included from Postgres::Conversion

#decode_array, #decode_bytea, #encode_bytea

Instance Method Details

#test_byteaObject


14
15
# File 'lib/postgres-pr/typeconv/TC_conv.rb', line 14

def test_bytea
end

#test_decode_arrayObject


7
8
9
10
11
12
# File 'lib/postgres-pr/typeconv/TC_conv.rb', line 7

def test_decode_array
  assert_equal ["abcdef ", "hallo", ["1", "2"]], decode_array("{   abcdef ,    hallo, {   1, 2} }")
  assert_equal [""], decode_array("{ }") # TODO: Correct?
  assert_equal [], decode_array("{}")
  assert_equal ["hallo", ""], decode_array("{hallo,}")
end