fixing a problem how web image cache is called.
[sgn.git] / t / system_message.t
blob6f1d69345cccacae373d0b784236506484b6ca0a
1 use Test::Most tests => 2;
2 use File::Temp;
4 use CXGN::MasonFactory;
6 my $c = SGN::Context->new;
8 my $tempfile = File::Temp->new;
9 $tempfile->print("fogbat!");
10 $tempfile->close;
12 $c->config->{system_message_file} = undef;
13 is( CXGN::MasonFactory->bare_render('/system_message.mas' ),
14     '',
15     'system message is empty for no message file'
16    );
18 # correctly set system_message_file var
19 $c->config->{system_message_file} = "$tempfile";
20 like( CXGN::MasonFactory->bare_render('/system_message.mas'),
21       qr/fogbat/,
22       'system message looks correct'
23      );