10 BEGIN { $ENV{SGN_SKIP_CGI} = 1 }
11 use SGN::Test qw/ ctx_request /;
12 use SGN::Test::WWW::Mechanize;
14 my $mech = SGN::Test::WWW::Mechanize->new;
15 $mech->with_test_level( process => sub {
16 my ( undef, $c ) = ctx_request('/');
18 my $test_string = 'fooish bar in the mailbox';
19 { my $html = $c->render_mason('/util/markup_string.mas',
20 string => $test_string,
23 like( $html, qr|^\s*$test_string\s*$|, 'outputs string and nothing else if no styles' );
27 { my $html = $c->render_mason('/util/markup_string.mas',
28 string => $test_string,
29 styles => { foo => ['<span class="foo">','</span>'] },
30 regions => [ [ 'foo', 0, 3 ] ],
33 like( $html, qr|$test_string|, 'test string is in single-region markup' );
34 like( $html, qr|<span class=\\"foo\\">|, 'markup string is present' );