3 use Test::More tests => 2;
8 # set up and populate schema
9 ok(my $schema = DBICTest->init_schema(), 'got schema');
12 my $artist_rs = $schema->resultset('Artist')->order_by(col => 'artistid')->display();
13 warn Dumper($artist_rs);
14 is_deeply($artist_rs, [
17 'name' => 'Caterwauler McCrae'
21 'name' => 'Random Boy Band'
25 'name' => 'We Are Goth'
27 ], 'ordered display returned as expected');
31 my $artists = $schema->resultset('Artist')->order_by(col => 'artistid')->with_substr->display();
35 'name' => 'Caterwauler McCrae',
40 'name' => 'Random Boy Band',
45 'name' => 'We Are Goth',
48 ], 'display with substring okay');