6 my $app = App::SCS->new(
7 config => { root_dir => 't/data' }
10 my $simple1 = $app->pages->get({ path => 'simple/1' });
12 ok($simple1, 'Got a page object');
16 io->file('t/data/share/pages/simple/1.html')->all,
20 my @page_plugins = @{$simple1->_page_plugins};
22 is(scalar(@page_plugins), 2, 'Two plugins applied');
24 my ($tp, $pdp) = @page_plugins;
27 $tp->isa('App::SCS::Plugin::Core::PagePlugin::Template'),
31 is($tp->name, 'layout', 'Template name');
34 $pdp->isa('App::SCS::Plugin::Core::PagePlugin::PageData'),
39 $simple1->_html_zoom->to_html,
40 qr{<div id="content">.*<h1>Hello world}s,
41 'Layout woven correctly'
45 $simple1->_content_zoom->to_html,
46 qr{<title[^>]*>Simple 1<}s,
47 'Page data interpolated'
50 my $res = $simple1->_psgi_response;
52 is(ref($res),'ARRAY','PSGI response');
53 is($res->[0],200,'200 OK');