X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fbind%2Fbindtype_columns.t;h=90ad8c6943ad4b7a60d0ea5e31d857958e8db724;hb=68de943862f06cabd397d2e74d12cd9cdc999779;hp=1462d9bde952f3c74e17bb6dc9a44ac2794b6b72;hpb=56095091b1629f5482ec4e344fd304d7863ea126;p=dbsrgits%2FDBIx-Class.git diff --git a/t/bind/bindtype_columns.t b/t/bind/bindtype_columns.t index 1462d9b..90ad8c6 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); @@ -9,7 +9,7 @@ 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 }); @@ -32,7 +32,7 @@ my $dbh = $schema->storage->dbh; ],{ RaiseError => 1, PrintError => 1 }); } -my $big_long_string = "\x00\x01\x02 abcd" x 125000; +my $big_long_string = "\x00\x01\x02 abcd" x 125000; my $new; # test inserting a row @@ -40,7 +40,7 @@ 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."); + is($new->bytea, $big_long_string, "Set the blob correctly."); } # test retrieval of the bytea column @@ -49,10 +49,7 @@ my $new; is($row->get_column('bytea'), $big_long_string, "Created the blob correctly."); } -TODO: { - local $TODO = - 'Passing bind attributes to $sth->bind_param() should be implemented (it only works in $storage->insert ATM)'; - +{ my $rs = $schema->resultset('BindType')->search({ bytea => $big_long_string }); # search on the bytea column (select)