extract translate controller tests
[catagits/catbook-code.git] / t / controller_Translate.t
CommitLineData
07c4c36a 1use strict;
2use warnings;
3use Test::More qw/no_plan/;
4
5BEGIN { use_ok 'Catalyst::Test', 'LolCatalyst::Lite' }
6
7use HTTP::Request::Common;
8
9my ($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
18ok( $response = request($request), 'Request');
19ok( $response->is_success, 'Response Successful 2xx' );
20is( $response->content_type, 'text/html', 'Response Content-Type' );
21like( $response->content, qr/CHEEZ/, "contains translated string");
22