Removed tests' reliance on deprecated JSON behaviour of overloading eq operator
skaufman [Sun, 10 Nov 2013 19:15:43 +0000 (19:15 +0000)]
Signed-off-by: Alexander Hartmaier <abraxxa@cpan.org>

t/rest/item.t
t/rest/list.t

index dea2b88..a2a50dd 100644 (file)
@@ -29,6 +29,7 @@ my $artist_view_url = "$base/api/rest/artist/";
     my %expected_response =
         $schema->resultset('Artist')->find($id)->get_columns;
     my $response = $json->decode( $mech->content );
+    #artist does not have use_json_boolean => 1, so true values are stringified to 'true'
     is_deeply(
         $response,
         { data => \%expected_response, success => 'true' },
@@ -65,7 +66,7 @@ my $track_view_url = "$base/api/rest/track/";
     my $response = $json->decode( $mech->content );
     is_deeply(
         $response,
-        { data => \%expected_response, success => 'true' },
+        { data => \%expected_response, success => JSON::true },
         'correct data returned for track with datetime'
     );
 }
index 3afd448..7337531 100644 (file)
@@ -203,7 +203,7 @@ my $track_list_url           = "$base/api/rest/track";
     } $schema->resultset('Track')->search( undef, { page => 1, } )->all;
     is_deeply(
         $response,
-        { list => \@expected_response, success => 'true', totalcount => 15 },
+        { list => \@expected_response, success => JSON::true, totalcount => 15 },
         'correct data returned for static configured paging'
     );
 }