[Bast-commits] r8122 -
DBIx-Class/0.08/branches/mssql_limit_regression/t
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed Dec 16 09:26:44 GMT 2009
Author: ribasushi
Date: 2009-12-16 09:26:43 +0000 (Wed, 16 Dec 2009)
New Revision: 8122
Modified:
DBIx-Class/0.08/branches/mssql_limit_regression/t/746mssql.t
Log:
Got a failing test
Modified: DBIx-Class/0.08/branches/mssql_limit_regression/t/746mssql.t
===================================================================
--- DBIx-Class/0.08/branches/mssql_limit_regression/t/746mssql.t 2009-12-15 23:50:52 UTC (rev 8121)
+++ DBIx-Class/0.08/branches/mssql_limit_regression/t/746mssql.t 2009-12-16 09:26:43 UTC (rev 8122)
@@ -238,18 +238,18 @@
my $schema = DBICTest::Schema->connect($dsn, $user, $pass);
$schema->populate ('BooksInLibrary', [
[qw/source owner title /],
- [qw/Library 1 secrets0/],
- [qw/Library 1 secrets1/],
+ [qw/Library 7 secrets10/],
[qw/Eatery 1 secrets2/],
+ [qw/Library 3 secrets4/],
+ [qw/Eatery 5 secrets8/],
+ [qw/Library 5 secrets7/],
[qw/Library 2 secrets3/],
- [qw/Library 3 secrets4/],
+ [qw/Eatery 7 secrets11/],
+ [qw/Library 4 secrets6/],
+ [qw/Library 1 secrets0/],
[qw/Eatery 3 secrets5/],
- [qw/Library 4 secrets6/],
- [qw/Library 5 secrets7/],
- [qw/Eatery 5 secrets8/],
[qw/Library 6 secrets9/],
- [qw/Library 7 secrets10/],
- [qw/Eatery 7 secrets11/],
+ [qw/Library 1 secrets1/],
[qw/Library 8 secrets12/],
]);
}, 'populate without PKs supplied ok' );
@@ -345,14 +345,16 @@
},
{
prefetch => 'owner',
- order_by => { -desc => 'owner.name' },
+ order_by => 'owner.name',
}
);
+ # this is the order in which they should come from the above query
+ my @owner_names = qw/boggle fISMBoC fREW fRIOUX fROOH fRUE wiggle wiggle/;
is ($rs->all, 8, 'Correct amount of objects from right-sorted joined resultset');
is_deeply (
[map { $_->owner->name } ($rs->all) ],
- [qw/wiggle wiggle fRUE fROOH fRIOUX fREW fISMBoC boggle /],
+ \@owner_names,
'Rows were properly ordered'
);
@@ -366,7 +368,7 @@
is_deeply (
[map { $_->owner->name } ($limited_rs->all) ],
- [qw/fRUE fROOH fRIOUX fREW fISMBoC boggle /],
+ [@owner_names[2 .. 7]],
'Limited rows were properly ordered'
);
is ($queries, 1, 'Only one query with prefetch');
@@ -377,7 +379,7 @@
is_deeply (
[map { $_->name } ($limited_rs->search_related ('owner')->all) ],
- [qw/fRUE fROOH fRIOUX fREW fISMBoC boggle /],
+ [@owner_names[2 .. 7]],
'Rows are still properly ordered after search_related'
);
@@ -425,7 +427,7 @@
FROM [books] [me]
JOIN [owners] [owner] ON [owner].[id] = [me].[owner]
WHERE ( ( [owner].[name] != ? AND [source] = ? ) )
- ORDER BY [owner].[name] DESC
+ ORDER BY [owner].[name]
) [me]
) [me]
) rno_subq
@@ -433,7 +435,7 @@
) [me]
JOIN [owners] [owner] ON [owner].[id] = [me].[owner]
WHERE ( ( [owner].[name] != ? AND [source] = ? ) )
- ORDER BY [owner].[name] DESC
+ ORDER BY [owner].[name]
)',
[ ([ 'owner.name' => 'woggle' ], [ source => 'Library' ]) x 2 ],
'Expected SQL executed',
More information about the Bast-commits
mailing list