X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frest%2Fupdate.t;h=49f0051bb38d6aa209fdac83a21fe79ca3b3e221;hb=3430f503dffc839d6ab693615bbec5bb60f24d07;hp=ee5837b9c341e813746101035b6c8f531eddc1f4;hpb=d273984026646e5b57c052deef3fcb9121122060;p=catagits%2FCatalyst-Controller-DBIC-API.git diff --git a/t/rest/update.t b/t/rest/update.t index ee5837b..49f0051 100644 --- a/t/rest/update.t +++ b/t/rest/update.t @@ -10,7 +10,7 @@ my $content_type = [ 'Content-Type', 'application/x-www-form-urlencoded' ]; use RestTest; use DBICTest; -use Test::More tests => 15; +use Test::More tests => 16; use Test::WWW::Mechanize::Catalyst 'RestTest'; use HTTP::Request::Common; use JSON::Any; @@ -71,7 +71,7 @@ my $track_update_url = "$base/api/rest/track/" . $track->id; } { - my $test_data = JSON::Any->Dump({ title => 'monkey monkey' }); + my $test_data = JSON::Any->Dump({ title => 'monkey monkey', 'cd' => { year => 2009 } }); my $req = POST( $track_update_url, Content => $test_data ); $req->content_type('text/x-json'); $mech->request($req); @@ -80,4 +80,5 @@ my $track_update_url = "$base/api/rest/track/" . $track->id; $track->discard_changes; is($track->title, 'monkey monkey', 'Title changed to "monkey monkey"'); + is($track->cd->year, 2009, 'related row updated'); }