[Catalyst-commits] r8262 - in
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk: .
lib/CatalystX/CRUD/Model t
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Sat Aug 23 04:22:41 BST 2008
Author: karpet
Date: 2008-08-23 04:22:41 +0100 (Sat, 23 Aug 2008)
New Revision: 8262
Modified:
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Makefile.PL
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/01-rdbo.t
Log:
update tests for new core api
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Makefile.PL
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Makefile.PL 2008-08-22 21:18:29 UTC (rev 8261)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Makefile.PL 2008-08-23 03:22:41 UTC (rev 8262)
@@ -13,7 +13,7 @@
'Data::Dump' => 0, # for testing
'Rose::DB::Object' => 0,
'Rose::DBx::Object::MoreHelpers' => 0,
- 'CatalystX::CRUD' => 0.18,
+ 'CatalystX::CRUD' => 0.29,
'Catalyst::Runtime' => 0,
'Rose::DBx::TestDB' => 0,
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm 2008-08-22 21:18:29 UTC (rev 8261)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm 2008-08-23 03:22:41 UTC (rev 8262)
@@ -10,7 +10,7 @@
our $VERSION = '0.13';
__PACKAGE__->mk_ro_accessors(qw( name manager treat_like_int ));
-__PACKAGE__->config->{object_class} = 'CatalystX::CRUD::Object::RDBO';
+__PACKAGE__->config( object_class => 'CatalystX::CRUD::Object::RDBO' );
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/01-rdbo.t
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/01-rdbo.t 2008-08-22 21:18:29 UTC (rev 8261)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/01-rdbo.t 2008-08-23 03:22:41 UTC (rev 8262)
@@ -24,20 +24,20 @@
is( $res->headers->{status}, 200, "get 200" );
-ok( $res = request('/foo/1/related/bars/2/add'),
- "GET /foo/1/related/bars/2/add" );
+ok( $res = request('/foo/1/bars/2/add'),
+ "GET /foo/1/bars/2/add" );
-is( $res->headers->{status}, 500, "cannot GET add related" );
+is( $res->headers->{status}, 400, "cannot GET add related" );
# add a new foobar
-ok( $res = request( POST( '/foo/1/related/bars/2/add', [] ) ),
- "POST /foo/1/related/bars/2/add" );
+ok( $res = request( POST( '/foo/1/bars/2/add', [] ) ),
+ "POST /foo/1/bars/2/add" );
-is( $res->headers->{status}, 200, "POST add related OK" );
+is( $res->headers->{status}, 204, "POST add related OK" );
# remove an old foobar
-ok( $res = request( POST( '/foo/1/related/bars/1/remove', [] ) ),
- "POST /foo/1/related/bars/1/remove" );
+ok( $res = request( POST( '/foo/1/bars/1/remove', [] ) ),
+ "POST /foo/1/bars/1/remove" );
-is( $res->headers->{status}, 200, "POST remove related OK" );
+is( $res->headers->{status}, 204, "POST remove related OK" );
More information about the Catalyst-commits
mailing list