File: 14alt_content_type.t

package info (click to toggle)
libcatalyst-view-tt-perl 0.46-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 336 kB
  • sloc: perl: 710; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 538 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;
use Test::More 0.88;

use FindBin;
use lib "$FindBin::Bin/lib";

use_ok('Catalyst::Test', 'TestApp');

# Hack to support Catalyst v5.90080+ (JNAP)
if(TestApp->can('encoding') and (my $enc = TestApp->encoding) and TestApp->can('clear_encoding')) {
  is(request("/test_alt_content_type")->header('Content-Type'), "text/plain; charset=${\$enc->mime_name}", "Plain text with ${\$enc->mime_name}");
} else {
  is(request("/test_alt_content_type")->header('Content-Type'), 'text/plain', 'Plain Text');
}
done_testing;