Commit | Line | Data |
f48dd03f |
1 | use strict;\r |
2 | use warnings;\r |
3 | \r |
4 | use Test::More;\r |
5 | use DBIx::Class::Storage::DBI;\r |
6 | \r |
7 | plan tests => 1;\r |
8 | \r |
9 | my $sa = new DBIC::SQL::Abstract;\r |
10 | \r |
11 | $sa->limit_dialect( 'Top' );\r |
12 | \r |
13 | is(\r |
14 | $sa->select( 'rubbish', [ 'foo.id', 'bar.id' ], undef, { order_by => 'artistid' }, 1, 3 ),\r |
15 | 'SELECT * FROM\r |
16 | (\r |
17 | SELECT TOP 1 * FROM\r |
18 | (\r |
19 | SELECT TOP 4 foo.id, bar.id FROM rubbish ORDER BY artistid ASC\r |
20 | ) AS foo\r |
21 | ORDER BY artistid DESC\r |
22 | ) AS bar\r |
23 | ORDER BY artistid ASC\r |
24 | ',\r |
25 | "make sure limit_dialect( 'Top' ) is working okay"\r |
26 | );\r |