X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=t%2F72pg.t;h=f9f61c47d6683d0f85554eb4c71129063e8b7bf8;hp=67911aa6d1c067f8d16473a40a133b909f04c53a;hb=a780a0ff7c99dd9b640f8c29ad0466bd0c907bf3;hpb=ed04f0765deb438a059ac948881747d846292bda diff --git a/t/72pg.t b/t/72pg.t index 67911aa..f9f61c4 100644 --- a/t/72pg.t +++ b/t/72pg.t @@ -225,13 +225,23 @@ for my $use_insert_returning ($test_server_supports_insert_returning arrayfield => [5, 6], }); + my $afield_rs = $schema->resultset('ArrayTest')->search({ + arrayfield => \[ '= ?' => [arrayfield => [3, 4]] ], #Todo anything less ugly than this? + }); + my $count; lives_ok { - $count = $schema->resultset('ArrayTest')->search({ - arrayfield => \[ '= ?' => [arrayfield => [3, 4]] ], #Todo anything less ugly than this? - })->count; + $count = $afield_rs->count } 'comparing arrayref to pg array data does not blow up'; is($count, 1, 'comparing arrayref to pg array data gives correct result'); + + TODO: { + local $TODO = 'No introspection of scalarref conditions :('; + my $row = $afield_rs->create({}); + is_deeply ($row->arrayfield, [3,4], 'Array value taken from $rs condition'); + $row->discard_changes; + is_deeply ($row->arrayfield, [3,4], 'Array value made it to storage'); + } }