From 2dbcea98a4511b8f5830244a14faaceefb5e3c91 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 5 Nov 2019 17:13:27 +0000 Subject: Factor out admin template code to own controller. --- t/app/controller/admin/templates.t | 2 -- 1 file changed, 2 deletions(-) (limited to 't/app/controller/admin/templates.t') diff --git a/t/app/controller/admin/templates.t b/t/app/controller/admin/templates.t index 6944f4b04..3bbd7bf85 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"; -- cgit v1.2.3 From b886792181eb77206054e73315a9d14cdb17e936 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 6 Nov 2019 16:00:32 +0000 Subject: Add user admin log page. --- t/app/controller/admin/templates.t | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 't/app/controller/admin/templates.t') 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 Report acknowledgement'); }; 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" ); -- cgit v1.2.3