[Catalyst-commits] r14050 - in CatalystX-CRUD/CatalystX-CRUD/trunk:
. t
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Thu Jul 14 02:33:42 GMT 2011
Author: karpet
Date: 2011-07-14 02:33:41 +0000 (Thu, 14 Jul 2011)
New Revision: 14050
Modified:
CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
CatalystX-CRUD/CatalystX-CRUD/trunk/t/03-rest.t
CatalystX-CRUD/CatalystX-CRUD/trunk/t/04-query.t
CatalystX-CRUD/CatalystX-CRUD/trunk/t/05-pks.t
Log:
release 0.52
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2011-07-14 02:29:03 UTC (rev 14049)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2011-07-14 02:33:41 UTC (rev 14050)
@@ -247,5 +247,7 @@
* added use_request_uri_for_path to test MyApp to fix
test failures with Catalyst::Runtime 5.80024
-0.52 xxx
+0.52 13 July 2011
* doc fix in Tutorial via RT#68499
+ * tests fixed for RT#68779
+
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/t/03-rest.t
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/t/03-rest.t 2011-07-14 02:29:03 UTC (rev 14049)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/t/03-rest.t 2011-07-14 02:33:41 UTC (rev 14050)
@@ -60,7 +60,7 @@
"POST new file2 response"
);
-is( $res->headers->{status}, 302, "new file 302 redirect status" );
+is( $res->code, 302, "new file 302 redirect status" );
###################################################
# test with no args
@@ -68,7 +68,7 @@
#system("tree t/lib/MyApp/root");
ok( $res = request('/rest/file'), "/ request with multiple items" );
-is( $res->headers->{status}, 200, "/ request with multiple items lists" );
+is( $res->code, 200, "/ request with multiple items lists" );
ok( $res->content =~ qr/foo bar baz/ && $res->content =~ qr/hello world/,
"content has 2 files" );
@@ -76,28 +76,27 @@
# test the Arg matching with no rpc
ok( $res = request('/rest/file/create'), "/rest/file/create" );
-is( $res->headers->{status}, 302, "/rest/file/create" );
+is( $res->code, 302, "/rest/file/create" );
ok( $res = request('/rest/file'), "zero" );
-is( $res->headers->{status}, 200, "zero => list()" );
+is( $res->code, 200, "zero => list()" );
ok( $res = request('/rest/file/testfile'), "one" );
-is( $res->headers->{status}, 200, "oid == one" );
+is( $res->code, 200, "oid == one" );
ok( $res = request('/rest/file/testfile/view'), "view" );
-is( $res->headers->{status}, 404, "rpc == two" );
+is( $res->code, 404, "rpc == two" );
ok( $res
= request(
POST( '/rest/file/testfile/dir/otherdir%2ftestfile2', [] ) ),
"three"
);
-is( $res->headers->{status}, 204, "related == three" );
+is( $res->code, 204, "related == three" );
ok( $res = request(
POST( '/rest/file/testfile/dir/otherdir%2ftestfile2/rpc', [] )
),
"four"
);
-is( $res->headers->{status},
- 404, "404 == related rpc with no enable_rpc_compat" );
+is( $res->code, 404, "404 == related rpc with no enable_rpc_compat" );
ok( $res = request('/rest/file/testfile/two/three/four/five'), "five" );
-is( $res->headers->{status}, 404, "404 == five" );
+is( $res->code, 404, "404 == five" );
ok( $res = request(
POST(
'/rest/file/testfile/dir/otherdir%2ftestfile2',
@@ -106,36 +105,35 @@
),
"three"
);
-is( $res->headers->{status}, 204, "related == three" );
+is( $res->code, 204, "related == three" );
# turn rpc enable on and run again
MyApp->controller('REST::File')->enable_rpc_compat(1);
ok( $res = request('/rest/file/create'), "/rest/file/create" );
-is( $res->headers->{status}, 302, "/rest/file/create" );
+is( $res->code, 302, "/rest/file/create" );
ok( $res = request('/rest/file'), "zero with rpc" );
-is( $res->headers->{status}, 200, "zero with rpc => list()" );
+is( $res->code, 200, "zero with rpc => list()" );
ok( $res = request('/rest/file/testfile'), "one with rpc" );
-is( $res->headers->{status}, 200, "oid == one with rpc" );
+is( $res->code, 200, "oid == one with rpc" );
ok( $res = request('/rest/file/testfile/view'), "view with rpc" );
-is( $res->headers->{status}, 200, "rpc == two with rpc" );
+is( $res->code, 200, "rpc == two with rpc" );
ok( $res = request(
POST( '/rest/file/testfile/dir/otherdir%2ftestfile2/add', [] )
),
"three with rpc"
);
-is( $res->headers->{status}, 204, "related == three with rpc" );
+is( $res->code, 204, "related == three with rpc" );
ok( $res = request(
POST( '/rest/file/testfile/dir/otherdir%2ftestfile2/rpc', [] )
),
"four"
);
-is( $res->headers->{status},
- 404, "404 == related rpc with enable_rpc_compat" );
+is( $res->code, 404, "404 == related rpc with enable_rpc_compat" );
ok( $res = request('/rest/file/testfile/two/three/four/five'),
"five with rpc" );
-is( $res->headers->{status}, 404, "404 == five with rpc" );
+is( $res->code, 404, "404 == five with rpc" );
ok( $res = request(
POST(
@@ -145,7 +143,7 @@
),
"three with rpc"
);
-is( $res->headers->{status}, 204, "related == three with rpc" );
+is( $res->code, 204, "related == three with rpc" );
# delete the file
@@ -183,5 +181,5 @@
ok( $res = request('/rest/file'), "/ request with no items" );
#dump $res;
-is( $res->headers->{status}, 200, "/ request with no items == 200" );
+is( $res->code, 200, "/ request with no items == 200" );
is( $res->content, "", "no content for no results" );
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/t/04-query.t
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/t/04-query.t 2011-07-14 02:29:03 UTC (rev 14049)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/t/04-query.t 2011-07-14 02:33:41 UTC (rev 14050)
@@ -12,7 +12,7 @@
#dump( $response->headers );
-is( $res->headers->{status}, '200', "response Ok" );
+is( $res->code, '200', "response Ok" );
ok( $res = request('/search/search?file=bar'), "?file=bar" );
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/t/05-pks.t
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/t/05-pks.t 2011-07-14 02:29:03 UTC (rev 14049)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/t/05-pks.t 2011-07-14 02:33:41 UTC (rev 14050)
@@ -13,4 +13,4 @@
"GET new file with null pk"
);
-is( $res->headers->{status}, 500, "exception thrown" );
+is( $res->code, 500, "exception thrown" );
More information about the Catalyst-commits
mailing list