test for 404 for nonexistant translation type
Matt S Trout [Sat, 7 Mar 2009 21:12:19 +0000 (16:12 -0500)]
t/controller_Translate.t

index 21c8ea3..47604eb 100644 (file)
@@ -44,3 +44,10 @@ ok(
 ok( $response->is_success, 'Response Successful 2xx' );
 
 like( $response->content, qr/CHEEZ/, "contains translated string");
+
+ok(
+  $response = request(GET 'http://localhost/translate/1/to/NONEXISTANT'),
+  'Request for non-existant translation type'
+);
+
+cmp_ok( $response->code, '==', 404, '404 error returned');