extract translate controller tests
[catagits/catbook-code.git] / t / controller_Translate.t
1 use strict;
2 use warnings;
3 use Test::More qw/no_plan/;
4
5 BEGIN { use_ok 'Catalyst::Test', 'LolCatalyst::Lite' }
6
7 use HTTP::Request::Common;
8
9 my ($request, $response);
10
11 $request = POST(
12         'http://localhost/translate',
13         'Content-Type' => 'form-data',
14         'Content'      => [
15             'lol' => 'Can i have a cheese burger?',
16         ]);
17
18 ok( $response = request($request), 'Request');
19 ok( $response->is_success, 'Response Successful 2xx' );
20 is( $response->content_type, 'text/html', 'Response Content-Type' );
21 like( $response->content, qr/CHEEZ/, "contains translated string");
22