5 use LWP::Protocol::PSGI;
6 use Test::WWW::Mechanize;
14 use IPC::System::Simple qw(system);
15 system("$FindBin::Bin/../script/maketestdb.pl");
17 LWP::Protocol::PSGI->register(stemmaweb->psgi_app);
19 my $ua = Test::WWW::Mechanize->new;
21 $ua->get_ok('http://localhost/login');
22 my $response = $ua->submit_form(
24 username => 'user@example.org',
25 password => 'UserPass'
28 $ua->content_contains('Stemmaweb - Logged in', 'Log in successful.');
30 my $content = $ua->get('/');
31 $ua->content_contains('Hello! user@example.org', 'We are logged in.');