| 1 |
#!perl |
| 2 |
|
| 3 |
use strict; |
| 4 |
use warnings; |
| 5 |
|
| 6 |
use lib 't/lib'; |
| 7 |
use Test::More; |
| 8 |
use Test::Deep; |
| 9 |
|
| 10 |
use TestSchema; |
| 11 |
my $schema = TestSchema->deploy_or_connect(); |
| 12 |
$schema->prepopulate; |
| 13 |
|
| 14 |
my $rs = $schema->resultset('Search'); |
| 15 |
|
| 16 |
cmp_deeply |
| 17 |
[$rs->null('me.id')->all], |
| 18 |
[$rs->search({ 'me.id' => undef })->all], |
| 19 |
'null works the same'; |
| 20 |
|
| 21 |
cmp_deeply |
| 22 |
[$rs->null('.id', 'bar_id')->all], |
| 23 |
[$rs->search({ 'me.id' => undef, 'bar_id' => undef })->all], |
| 24 |
'null works the same for 2 params'; |
| 25 |
|
| 26 |
done_testing; |