aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin/templates.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller/admin/templates.t')
-rw-r--r--t/app/controller/admin/templates.t9
1 files changed, 7 insertions, 2 deletions
diff --git a/t/app/controller/admin/templates.t b/t/app/controller/admin/templates.t
index 3bbd7bf85..39903deb1 100644
--- a/t/app/controller/admin/templates.t
+++ b/t/app/controller/admin/templates.t
@@ -61,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 {
@@ -215,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" );