object key modifier works okay
[dbsrgits/DBIx-Class-ResultSet-WithMetaData.git] / t / basic.t
1 #!perl
2
3 use Test::More tests => 2;
4 use lib qw(t/lib);
5 use DBICTest;
6 use Data::Dumper;
7
8 # set up and populate schema
9 ok(my $schema = DBICTest->init_schema(), 'got schema');
10
11 my $producer_rs = $schema->resultset('Producer')->display();
12
13 is_deeply([sort { $a->{producerid} <=> $b->{producerid} } @{$producer_rs}], [
14         {
15                 'name' => 'Matt S Trout',
16                 'producerid' => '1'
17         },
18         {
19                 'name' => 'Bob The Builder',
20                 'producerid' => '2'
21         },
22         {
23                 'name' => 'Fred The Phenotype',
24                 'producerid' => '3'
25         }
26 ], 'display returned as expected');