t/issues/gh-1046/gh-1046.t
raw| 1 | use strict; |
| 2 | use warnings; |
| 3 | use Test::More; |
| 4 | use Plack::Test; |
| 5 | use HTTP::Request::Common; |
| 6 | |
| 7 | { |
| 8 | ## no critic |
| 9 | package App; |
| 10 | use Dancer2; |
| 11 | get '/' => sub {1}; |
| 12 | } |
| 13 | |
| 14 | my $test = Plack::Test->create( App->to_app ); |
| 15 | my $res = $test->request( GET '/' ); |
| 16 | |
| 17 | is( |
| 18 | $res->headers->header('Server'), |
| 19 | undef, |
| 20 | 'Server header not available', |
| 21 | ); |
| 22 | |
| 23 | done_testing; |