FIX: correct test suite

FIX: correct test suite

You can not cast dates consistently across dbs

diff --git a/test/mini_sql/connection_tests.rb b/test/mini_sql/connection_tests.rb
index a67bab4..2b58462 100644
--- a/test/mini_sql/connection_tests.rb
+++ b/test/mini_sql/connection_tests.rb
@@ -152,13 +152,12 @@ module MiniSql::ConnectionTests
   end
 
   def test_serializer_marshal
-    r = @connection.query("select 1 one, 'two' two, 'now'::date today")
+    r = @connection.query("select 1 one, 'two' two")
     dump = Marshal.dump(MiniSql::Serializer.marshallable(r))
     r = Marshal.load(dump)
 
     assert_equal(r[0].one, 1)
     assert_equal(r[0].two, "two")
-    assert_equal(r[0].today, Date.today)
     assert_equal(r.length, 1)
   end
 
diff --git a/test/mini_sql/postgres/connection_test.rb b/test/mini_sql/postgres/connection_test.rb
index 7d82bc8..ab5c451 100644
--- a/test/mini_sql/postgres/connection_test.rb
+++ b/test/mini_sql/postgres/connection_test.rb
@@ -13,6 +13,17 @@ class MiniSql::Postgres::TestConnection < MiniTest::Test
 
   include MiniSql::ConnectionTests
 
+  def test_serializer_marshal_with_date
+    r = @connection.query("select 1 one, 'two' two, 'now'::date today", Date.today)
+    dump = Marshal.dump(MiniSql::Serializer.marshallable(r))
+    r = Marshal.load(dump)
+
+    assert_equal(r[0].one, 1)
+    assert_equal(r[0].two, "two")
+    assert_equal(r[0].today, Date.today)
+    assert_equal(r.length, 1)
+  end
+
   def test_custom_type_map
     map = PG::TypeMapByOid.new
     cnn = pg_connection(type_map: map)

GitHub sha: 784b09c7