Commit | Line | Data |
---|---|---|
93cec8c3 | 1 | # vim: filetype=perl |
2 | ||
3 | sub run_tests { | |
4 | ||
5 | my $schema = shift; | |
6 | my $artists = $schema->resultset("Artist")->search({},{order_by=>'position'}); | |
7 | ||
8 | plan tests => $artists->count(); | |
9 | ||
10 | my $expected_position = 0; | |
11 | while (my $artist = $artists->next()) { | |
12 | $expected_position ++; | |
13 | ok( ($artist->position()==$expected_position), 'default positions set as expected' ); | |
14 | } | |
15 | } | |
16 | ||
17 | 1; |