5 use LWP::Protocol::PSGI;
6 use Test::WWW::Mechanize;
12 LWP::Protocol::PSGI->register(stemmaweb->psgi_app);
14 my $ua = Test::WWW::Mechanize->new;
16 $ua->get_ok('http://localhost/login');
17 my $response = $ua->submit_form(
19 username => 'user@example.org',
20 password => 'UserPass'
23 $ua->content_contains('Stemmaweb - Logged in', 'Log in successful.');
25 my $content = $ua->get('/');
26 $ua->content_contains('Hello! user@example.org', 'We are logged in.');