Debian Codegraph @

t/issues/gh-596.t

raw
1 use strict;
2 use warnings;
3 use Test::More tests => 2;
4 use Plack::Test;
5 use HTTP::Request::Common;
6
7 BEGIN { $ENV{'DANCER_NO_SERVER_TOKENS'} = 'foo' }
8
9 {
10 package App;
11 use Dancer2;
12 get '/' => sub { config->{'no_server_tokens'} };
13 }
14
15 my $test = Plack::Test->create( App->to_app );
16 my $res = $test->request( GET '/' );
17
18 ok( $res->is_success, 'Successful' );
19 is( $res->content, 'foo', 'Correct server tokens configuration' );
20