Catalyst-Plugin-AutoCRUD
view release on metacpan or search on metacpan
t/13-extjs-cachefly.t view on Meta::CPAN
# get basic template, no Metadata
$mech->get_ok('/autocrud/helloworld', 'Get Hello World page');
is($mech->ct, 'text/html', 'Hello World page content type');
$mech->content_contains('Hello, World!', 'Hello World page content');
$mech->content_contains('http://extjs.cachefly.net/',
"pages are using the ExtJS CacheFly links");
# mimic that the webserver is running behind a reverse proxy that proxies from
# HTTPS to HTTP
$mech->default_header('X-Forwarded-For' => '127.0.0.1');
$mech->default_header('X-Forwarded-Host' => 'localhost');
$mech->default_header('X-Forwarded-Port' => 443);
# get basic template, no Metadata
$mech->get_ok('/autocrud/helloworld', 'Get Hello World page (HTTPS)');
is($mech->ct, 'text/html', 'Hello World page content type (HTTPS)');
$mech->content_contains('Hello, World!', 'Hello World page content (HTTPS)');
$mech->content_contains('https://extjs.cachefly.net/',
"pages are using the ExtJS CacheFly links (HTTPS)");
( run in 0.408 second using v1.01-cache-2.11-cpan-26ccb49234f )