1 use Test::Most tests => 5;
5 use aliased 'SGN::Test::WWW::Mechanize';
6 my $mech = Mechanize->new;
8 $mech->with_test_level( local => sub {
9 my $c = $mech->context;
11 my $message_file = $c->config->{system_message_file}
12 or die "must have a system_message_file conf var defined";
15 skip "system message file $message_file already exists, not overwriting for test", 5
19 $mech->content_lacks('system message active', 'no system message if no message file');
21 file($message_file)->openw->write('Testing site-wide message system');
24 $mech->content_contains('system message active', 'system message file, now have system message');
25 $mech->content_contains('Testing site-wide message system', 'got actual message');