aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/model
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-09-19 10:07:12 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-10-03 15:53:29 +0100
commit1ada9ee8ca6ba10bd6b3c7fb02f7b5599972db5c (patch)
tree894ef51a1eca70bb9a93a25dd0b4d38a0904463b /t/app/model
parentc73fc63cb5cb516377ed2638bbd607dbd4357bd5 (diff)
Per-test file email addresses.
Diffstat (limited to 't/app/model')
-rw-r--r--t/app/model/session.t4
-rw-r--r--t/app/model/user.t2
2 files changed, 3 insertions, 3 deletions
diff --git a/t/app/model/session.t b/t/app/model/session.t
index f76533727..f460204e5 100644
--- a/t/app/model/session.t
+++ b/t/app/model/session.t
@@ -2,13 +2,13 @@ use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;
-$mech->log_in_ok('test@example.com');
+my $user = $mech->log_in_ok('test@example.com');
my $session = FixMyStreet::DB->resultset("Session")->first;
my $id = $session->id;
$id =~ s/\s+$//;
is $id, "session:" . $session->id_code;
-is $session->user->email, 'test@example.com';
+is $session->user->email, $user->email;
done_testing;
diff --git a/t/app/model/user.t b/t/app/model/user.t
index 88b29ca84..c1981c858 100644
--- a/t/app/model/user.t
+++ b/t/app/model/user.t
@@ -67,7 +67,7 @@ FixMyStreet::override_config {
};
subtest 'Check non-existent methods on user object die' => sub {
- my $c = ctx_request(POST '/auth', { username => 'test@example.com', password_sign_in => 'secret' });
+ my $c = ctx_request(POST '/auth', { username => $problem->user->email, password_sign_in => 'secret' });
throws_ok(
sub { $c->user->is_super_user },
qr/Can't locate object method 'is_super_user'/,