aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/app/controller/alert_new.t8
-rw-r--r--t/app/model/alert_type.t2
2 files changed, 6 insertions, 4 deletions
diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t
index 708a152bc..ac2ec20ac 100644
--- a/t/app/controller/alert_new.t
+++ b/t/app/controller/alert_new.t
@@ -461,19 +461,21 @@ subtest "Test normal alert signups and that alerts are sent" => sub {
like $email->body, qr/Other User/, 'Update name given';
unlike $email->body, qr/Anonymous User/, 'Update name not given';
- # The update alert was to the problem reporter, so has a login update URL
+ # The update alert was to the problem reporter, so has a special update URL
+ $mech->log_out_ok;
$mech->get_ok( "/report/$report_id" );
$mech->content_lacks( 'has not been fixed' );
- my ($url) = $email->body =~ m{(http://\S+/M/\S+)};
+ my ($url) = $email->body =~ m{(http://\S+/R/\S+)};
ok $url, "extracted update url '$url'";
$mech->get_ok( $url );
is $mech->uri->path, "/report/" . $report_id, "redirected to report page";
$mech->content_contains( 'has not been fixed' );
- $mech->logged_in_ok;
+ $mech->not_logged_in_ok;
($url) = $emails[0]->body =~ m{http://\S+(/A/\S+)};
$mech->get_ok( $url );
$mech->content_contains('alert deleted');
+ $mech->not_logged_in_ok;
$mech->delete_user($user1);
$mech->delete_user($user2);
diff --git a/t/app/model/alert_type.t b/t/app/model/alert_type.t
index 5b7494a04..528c4d354 100644
--- a/t/app/model/alert_type.t
+++ b/t/app/model/alert_type.t
@@ -150,7 +150,7 @@ for my $test (
like $body, qr/$msg/, 'email says problem is ' . $test->{state};
if ($to eq $user->email) {
- like $body, qr{/M/}, 'contains problem login url';
+ like $body, qr{/R/}, 'contains problem login url';
} elsif ($to eq $user3->email) {
like $body, qr{/report/$report_id}, 'contains problem url';
}