diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-11-10 19:27:06 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-11-10 19:27:06 +0000 |
commit | d8dd060a4c2f75e89a24f99634d91a6d8ef0e2bc (patch) | |
tree | abb543c32c9e5f239cc66cff1bafa697f322ebd3 /t/app/controller/admin/templates.t | |
parent | db61249c59a96a2fad80523288b7d13881c10965 (diff) | |
parent | b886792181eb77206054e73315a9d14cdb17e936 (diff) |
Merge branch 'admin-auditing'
Diffstat (limited to 't/app/controller/admin/templates.t')
-rw-r--r-- | t/app/controller/admin/templates.t | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/t/app/controller/admin/templates.t b/t/app/controller/admin/templates.t index 6944f4b04..39903deb1 100644 --- a/t/app/controller/admin/templates.t +++ b/t/app/controller/admin/templates.t @@ -45,8 +45,6 @@ my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( } ); -$mech->log_in_ok( $superuser->email ); - my $report_id = $report->id; ok $report, "created test report - $report_id"; @@ -63,7 +61,13 @@ subtest "response templates can be added" => sub { }; $mech->submit_form_ok( { with_fields => $fields } ); - is $oxfordshire->response_templates->count, 1, "Response template was added"; + is $oxfordshire->response_templates->count, 1, "Response template was added"; +}; + +subtest 'check log of the above' => sub { + my $template_id = $oxfordshire->response_templates->first->id; + $mech->get_ok('/admin/users/' . $superuser->id . '/log'); + $mech->content_contains('Added template <a href="/admin/templates/' . $oxfordshire->id . '/' . $template_id . '">Report acknowledgement</a>'); }; subtest "but not another with the same title" => sub { @@ -217,7 +221,6 @@ subtest "auto-response templates that duplicate external_status_code can't be ad }); is $oxfordshire->response_templates->count, 1, "Initial response template was created"; - $mech->log_in_ok( $superuser->email ); $mech->get_ok( "/admin/templates/" . $oxfordshire->id . "/new" ); |