[Bps-public-commit] r17272 - Prophet/branches/sqlite/t
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Dec 16 22:23:44 EST 2008
Author: sunnavy
Date: Tue Dec 16 22:23:43 2008
New Revision: 17272
Modified:
Prophet/branches/sqlite/t/resty-server.t
Log:
tiny change
Modified: Prophet/branches/sqlite/t/resty-server.t
==============================================================================
--- Prophet/branches/sqlite/t/resty-server.t (original)
+++ Prophet/branches/sqlite/t/resty-server.t Tue Dec 16 22:23:43 2008
@@ -39,7 +39,16 @@
is( $ua->content, '["Cars"]' );
$ua->get_ok( url( 'records', 'Cars', $uuid . ".json" ) );
-is( $ua->content, '{"original_replica":"'.$car->handle->uuid.'","creator":"'.$car->default_prop_creator.'","wheels":"4","windshields":"1"}' );
+is_deeply(
+ from_json( $ua->content ),
+ from_json(
+ '{"original_replica":"'
+ . $car->handle->uuid
+ . '","creator":"'
+ . $car->default_prop_creator
+ . '","wheels":"4","windshields":"1"}'
+ )
+);
$ua->get( url( 'records', 'Cars', "1234.json" ) );
is( $ua->status, '404' );
@@ -47,7 +56,17 @@
$ua->post_ok( url( 'records', 'Cars', $uuid . ".json" ), { wheels => 6 } );
$ua->get_ok( url( 'records', 'Cars', $uuid . ".json" ) );
-is( $ua->content, '{"original_replica":"'.$car->handle->uuid.'","creator":"'.$car->default_prop_creator.'","wheels":"6","windshields":"1"}' );
+
+is_deeply(
+ from_json( $ua->content ),
+ from_json(
+ '{"original_replica":"'
+ . $car->handle->uuid
+ . '","creator":"'
+ . $car->default_prop_creator
+ . '","wheels":"6","windshields":"1"}'
+ )
+);
$ua->post( url( 'records', 'Cars', "doesnotexist.json" ), { wheels => 6 } );
is( $ua->status, '404', "Can't update a nonexistant car" );
More information about the Bps-public-commit
mailing list