diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-10-10 17:22:04 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-10-10 17:22:04 +0100 |
commit | f058885277b593c2e866cf251177fe2d70207edb (patch) | |
tree | f46d3580ea59489f5a3c21a5f80db020ff16d5b5 /t/app/controller | |
parent | 5eb4f4e746283b4e945b52745503baa4da4f345f (diff) |
Stop warnings if org is not provided.
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 9158231df..06d49e3c1 100644 --- a/t/app/controller/report_new.t +++ b/t/app/controller/report_new.t @@ -374,9 +374,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 @@ -405,10 +407,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( { |