3 use Test::More qw/no_plan/;
6 BEGIN { use_ok 'Catalyst::Test', 'LolCatalyst::Lite' }
8 use HTTP::Request::Common;
12 my $request = GET('http://localhost');
13 my $response = request($request);
14 ok( $response = request($request), 'Request');
15 ok( $response->is_success, 'Response Successful 2xx' );
16 is( $response->content_type, 'text/html', 'Response Content-Type' );
17 like( $response->content, qr/Translate/, "contains translated string");
19 # test request to translate_service
22 'http://localhost/translate_service',
23 'Content-Type' => 'form-data',
25 'lol' => 'Can i have a cheese burger?',
27 ok($response = request($request), 'Request');
28 ok( $response->is_success, 'Response Successful 2xx' );
29 is( $response->content_type, 'application/json', 'Response Content-Type' );
30 like( $response->content, qr/CHEEZ/, "contains translated string");