[Catalyst-commits] r9150 - in Catalyst-Controller-DBIC-API/1.001/trunk/t: rpc var

lukes at dev.catalyst.perl.org lukes at dev.catalyst.perl.org
Fri Jan 30 17:26:27 GMT 2009


Author: lukes
Date: 2009-01-30 17:26:27 +0000 (Fri, 30 Jan 2009)
New Revision: 9150

Modified:
   Catalyst-Controller-DBIC-API/1.001/trunk/t/rpc/list.t
   Catalyst-Controller-DBIC-API/1.001/trunk/t/var/DBIxClass.db
Log:
failing test for ambigous column names in where

Modified: Catalyst-Controller-DBIC-API/1.001/trunk/t/rpc/list.t
===================================================================
--- Catalyst-Controller-DBIC-API/1.001/trunk/t/rpc/list.t	2009-01-30 17:17:43 UTC (rev 9149)
+++ Catalyst-Controller-DBIC-API/1.001/trunk/t/rpc/list.t	2009-01-30 17:26:27 UTC (rev 9150)
@@ -150,3 +150,17 @@
   #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);
+  if (cmp_ok( $mech->status, '==', 200, 'search on col which exists for me and related table okay' )) {
+    my @expected_response = map { { $_->get_columns } } $schema->resultset('CD')->search({'me.title' => 'Spoonful of bees', 'tracks.position' => 1})->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 col which exists for me and related table' );
+  }
+}

Modified: Catalyst-Controller-DBIC-API/1.001/trunk/t/var/DBIxClass.db
===================================================================
(Binary files differ)




More information about the Catalyst-commits mailing list