[Catalyst-commits] r9619 - in
Catalyst-Controller-DBIC-API/1.002/trunk/t: rpc var
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Mon Mar 30 16:56:32 BST 2009
Author: lukes
Date: 2009-03-30 16:56:32 +0100 (Mon, 30 Mar 2009)
New Revision: 9619
Modified:
Catalyst-Controller-DBIC-API/1.002/trunk/t/rpc/list.t
Catalyst-Controller-DBIC-API/1.002/trunk/t/var/DBIxClass.db
Log:
added extra test case to check searches on relation with col of same name okay
Modified: Catalyst-Controller-DBIC-API/1.002/trunk/t/rpc/list.t
===================================================================
--- Catalyst-Controller-DBIC-API/1.002/trunk/t/rpc/list.t 2009-03-29 19:40:40 UTC (rev 9618)
+++ Catalyst-Controller-DBIC-API/1.002/trunk/t/rpc/list.t 2009-03-30 15:56:32 UTC (rev 9619)
@@ -60,7 +60,6 @@
is_deeply( { list => \@expected_response, success => 'true' }, $response, 'correct data returned for complex query' );
}
-exit;
{
my $uri = URI->new( $producer_list_url );
my $req = GET( $uri, 'Accept' => 'text/x-json' );
@@ -198,6 +197,19 @@
{
my $uri = URI->new( $cd_list_url );
+ $uri->query_form({ 'search.artist.artistid' => 1 });
+ my $req = GET( $uri, 'Accept' => 'text/x-json' );
+ $mech->request($req);
+ cmp_ok( $mech->status, '==', 200, 'search on rel column with same name rel request okay' );
+
+ my @expected_response = map { { $_->get_columns } } $schema->resultset('CD')->search({'artist.artistid' => 1}, { join => 'artist' })->all;
+ my $response = JSON::Syck::Load( $mech->content);
+ #use Data::Dumper; warn Dumper($response, \@expected_response);
+ is_deeply( { list => \@expected_response, success => 'true' }, $response, 'correct data returned for search on column with same name rel' );
+}
+
+{
+ my $uri = URI->new( $cd_list_url );
$uri->query_form({ 'search.title' => 'Spoonful of bees', 'search.tracks.position' => 1 });
my $req = GET( $uri, 'Accept' => 'text/x-json' );
$mech->request($req);
Modified: Catalyst-Controller-DBIC-API/1.002/trunk/t/var/DBIxClass.db
===================================================================
(Binary files differ)
More information about the Catalyst-commits
mailing list