X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fbind%2Fbindtype_columns.t;h=a6be9979c78e77e4021f4f72c8bb09f404eba32c;hb=e9b9a8e97f7fc453d7b6f1f5625987992ab4cce2;hp=72b460c047a1b27756e62ab7709623d5b0bd7c57;hpb=d7f20fdf18a715c90597dd65167d4dafaac7c69f;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/bind/bindtype_columns.t b/t/bind/bindtype_columns.t index 72b460c..a6be997 100644 --- a/t/bind/bindtype_columns.t +++ b/t/bind/bindtype_columns.t @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings; use Test::More; use lib qw(t/lib); @@ -10,8 +10,6 @@ my ($dsn, $dbuser, $dbpass) = @ENV{map { "DBICTEST_PG_${_}" } qw/DSN USER PASS/} plan skip_all => 'Set $ENV{DBICTEST_PG_DSN}, _USER and _PASS to run this test' unless ($dsn && $dbuser); -plan tests => 6; - my $schema = DBICTest::Schema->connection($dsn, $dbuser, $dbpass, { AutoCommit => 1 }); my $dbh = $schema->storage->dbh; @@ -32,6 +30,8 @@ my $dbh = $schema->storage->dbh; ],{ RaiseError => 1, PrintError => 1 }); } +$schema->storage->debug(0); # these tests spew up way too much stuff, disable trace + my $big_long_string = "\x00\x01\x02 abcd" x 125000; my $new; @@ -80,6 +80,15 @@ my $new; $schema->txn_rollback; }); } + + # create with blob from $rs + $new = $rs->create({}); + is($new->bytea, $big_long_string, 'Object has bytea value from $rs'); + $new->discard_changes; + is($new->bytea, $big_long_string, 'bytea value made it to db'); } -$dbh->do("DROP TABLE bindtype_test"); +done_testing; + +eval { $dbh->do("DROP TABLE bindtype_test") }; +