t/ResultSet/Shortcut/Search/NotNull.t
raw| 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->not_null(['me.id'])->all], |
| 18 | [$rs->search({ 'me.id' => { '!=' => undef } })->all], |
| 19 | 'not_null works the same'; |
| 20 | |
| 21 | done_testing; |