3 use Test::More tests => 3;
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 is_deeply($artist_rs, [
16 'name' => 'Caterwauler McCrae'
20 'name' => 'Random Boy Band'
24 'name' => 'We Are Goth'
26 ], 'ordered display returned as expected');
30 my $artists = $schema->resultset('Artist')->order_by(col => 'artistid')->with_substr->display();
34 'name' => 'Caterwauler McCrae',
39 'name' => 'Random Boy Band',
44 'name' => 'We Are Goth',
47 ], 'display with substring okay');