diff options
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/report_new.t | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t index a071d3fda..9ec8fa4a8 100644 --- a/t/app/controller/report_new.t +++ b/t/app/controller/report_new.t @@ -375,9 +375,11 @@ foreach my $test ( FixMyStreet::App->model('DB::User')->find( { email => $test_email } ); ok $user, "user found"; if ($test->{user}) { + is $user->name, 'Old Name', 'name unchanged'; ok $user->check_password('old_password'), 'password unchanged'; } else { - ok $user->check_password('secret'), 'password set correctly'; + is $user->name, undef, 'name not yet set'; + is $user->password, '', 'password not yet set for new user'; } # find the report @@ -406,10 +408,8 @@ foreach my $test ( $mech->get_ok( '/report/' . $report->id ); - if ($test->{user}) { - is $report->name, 'Joe Bloggs', 'name updated correctly'; - ok $report->user->check_password('secret'), 'password updated correctly'; - } + is $report->name, 'Joe Bloggs', 'name updated correctly'; + ok $report->user->check_password('secret'), 'password updated correctly'; # check that the reporter has an alert my $alert = FixMyStreet::App->model('DB::Alert')->find( { |