From: Peter Rabbitson Date: Mon, 28 Mar 2011 13:21:35 +0000 (+0200) Subject: Stop flooding the console with garbage on pg blob errors X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10f6d2b79540cc0aa0cf035a80a240d7f182a394;p=dbsrgits%2FDBIx-Class-Historic.git Stop flooding the console with garbage on pg blob errors --- diff --git a/t/bind/bindtype_columns.t b/t/bind/bindtype_columns.t index 940ce92..d507a6d 100644 --- a/t/bind/bindtype_columns.t +++ b/t/bind/bindtype_columns.t @@ -41,13 +41,13 @@ my $new; $new = $schema->resultset('BindType')->create({ bytea => $big_long_string }); ok($new->id, "Created a bytea row"); - is($new->bytea, $big_long_string, "Set the blob correctly."); + ok($new->bytea eq $big_long_string, "Set the blob correctly."); } # test retrieval of the bytea column { my $row = $schema->resultset('BindType')->find({ id => $new->id }); - is($row->get_column('bytea'), $big_long_string, "Created the blob correctly."); + ok($row->get_column('bytea') eq $big_long_string, "Created the blob correctly."); } { @@ -65,7 +65,7 @@ my $new; $schema->txn_do(sub { $rs->update({ bytea => $new_big_long_string }); my $row = $schema->resultset('BindType')->find({ id => $new->id }); - is($row ? $row->get_column('bytea') : undef, $new_big_long_string, + ok( ($row ? $row->get_column('bytea') : '') eq $new_big_long_string, "Updated the row correctly (searching on the bytea column)." ); $schema->txn_rollback; @@ -84,9 +84,9 @@ my $new; # create with blob from $rs $new = $rs->create({}); - is($new->bytea, $big_long_string, 'Object has bytea value from $rs'); + ok($new->bytea eq $big_long_string, 'Object has bytea value from $rs'); $new->discard_changes; - is($new->bytea, $big_long_string, 'bytea value made it to db'); + ok($new->bytea eq $big_long_string, 'bytea value made it to db'); } done_testing;