3 # use Test::More qw/no_plan/;
4 use Test::More tests => 13;
7 BEGIN { use_ok 'Catalyst::Test', 'LolCatalyst::Lite' }
9 use HTTP::Request::Common;
13 my $request = GET('http://localhost');
14 my $response = request($request);
15 ok( $response = request($request), 'Request');
16 ok( $response->is_success, 'Response Successful 2xx' );
17 is( $response->content_type, 'text/html', 'Response Content-Type' );
18 like( $response->content, qr/Translate/, "contains translated string");
20 # test request to translate
23 'http://localhost/translate',
24 'Content-Type' => 'form-data',
26 'lol' => 'Can i have a cheese burger?',
29 ok( $response = request($request), 'Request');
30 ok( $response->is_success, 'Response Successful 2xx' );
31 is( $response->content_type, 'text/html', 'Response Content-Type' );
32 like( $response->content, qr/CHEEZ/, "contains translated string");
34 # test request to translate_service
37 'http://localhost/translate_service',
38 'Content-Type' => 'form-data',
40 'lol' => 'Can i have a cheese burger?',
42 ok($response = request($request), 'Request');
43 ok( $response->is_success, 'Response Successful 2xx' );
44 is( $response->content_type, 'application/json', 'Response Content-Type' );
45 like( $response->content, qr/CHEEZ/, "contains translated string");