3 t/integration/solpeople.t - tests for solpeople URLs
7 Tests for solpeople URLs
21 use SGN::Test::WWW::Mechanize;
23 my $base_url = $ENV{SGN_TEST_SERVER};
24 my $mech = SGN::Test::WWW::Mechanize->new;
26 $mech->while_logged_in_all( sub {
28 $mech->get_ok('/solpeople/top-level.pl');
29 $mech->content_contains('My '.$mech->context->get_conf("project_name") );
30 $mech->content_contains('[log out]');
31 $mech->content_contains('User Status');
32 $mech->content_contains('General Tools');
33 $mech->content_like(qr{Your current user status is\s+<b>$user_info->{user_type}</b>});
37 my $url = "/solpeople/account-confirm.pl";
38 $mech->get_ok("$base_url/$url?username=fiddlestix");
39 $mech->content_like(qr/.*Sorry, we are unable to process this confirmation request\..*No confirmation is required for user .*fiddlestix/ms);
43 my $url = "/solpeople/personal-info.pl";
44 $mech->get_ok("$base_url/$url?action=edit&sp_person_id=42");
45 $mech->content_like(qr/You do not have rights to modify this database entry because you do not own it/ms);
49 my $url = "/solpeople/personal-info.pl";
50 $mech->get_ok("$base_url/$url?action=store&sp_person_id=42");
51 $mech->content_like(qr/You do not have rights to modify this database entry because you do not own it/ms);
55 my $url = '/solpeople/login.pl';
56 $mech->get_ok("$base_url/$url?logout=yes");
57 $mech->content_like(qr/You have successfully logged out\. Thanks for using/ms);