diff options
Diffstat (limited to 't')
-rw-r--r-- | t/app/controller/report_as_other.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/app/controller/report_as_other.t b/t/app/controller/report_as_other.t index 326b3c906..daa213e8c 100644 --- a/t/app/controller/report_as_other.t +++ b/t/app/controller/report_as_other.t @@ -133,6 +133,18 @@ subtest "Body user, has permission to add update as another (existing) user" => like $mech->get_text_body_from_email, qr/Your update has been logged/; }; +subtest "Body user, has permission to add update as anonymous user" => sub { + my $update = add_update( + 'contribute_as_anonymous_user', + form_as => 'anonymous_user', + update => 'Test Update', + ); + is $update->name, 'Oxfordshire County Council', 'update name is body'; + is $update->user->name, 'Body User', 'user name unchanged'; + is $update->user->id, $user->id, 'user matches'; + is $update->anonymous, 1, 'update anonymous'; +}; + done_testing(); sub start_report { |