From 7a39608ab48c8fd3fa2c5a8061b42ee8f9869973 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 5 Nov 2019 16:33:51 +0000 Subject: Add admin log entry for more objects and things. Namely templates, roles, bodies, categories, various user edits, and when using the inspect form and changing category. --- t/app/controller/admin/report_edit.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/app/controller/admin/report_edit.t') diff --git a/t/app/controller/admin/report_edit.t b/t/app/controller/admin/report_edit.t index c6e03ff7e..1a2e8f1bf 100644 --- a/t/app/controller/admin/report_edit.t +++ b/t/app/controller/admin/report_edit.t @@ -353,7 +353,7 @@ foreach my $test ( user_body => $oxfordshire, changes => { state => 'in progress', category => 'Potholes' }, log_entries => [ - qw/edit state_change edit state_change edit edit resend edit state_change edit state_change edit state_change edit state_change edit state_change edit edit edit edit edit/ + qw/edit state_change category_change edit state_change edit edit resend edit state_change edit state_change edit state_change edit state_change edit state_change edit edit edit edit edit/ ], resend => 0, }, -- cgit v1.2.3 From 8fb05a1e55bd2534ebd6cbba0b95f750b41ab6bd Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Thu, 7 Nov 2019 09:33:52 +0000 Subject: Store a moderation history on admin report edit. --- t/app/controller/admin/report_edit.t | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 't/app/controller/admin/report_edit.t') diff --git a/t/app/controller/admin/report_edit.t b/t/app/controller/admin/report_edit.t index 1a2e8f1bf..85f83781c 100644 --- a/t/app/controller/admin/report_edit.t +++ b/t/app/controller/admin/report_edit.t @@ -412,6 +412,13 @@ foreach my $test ( delete $test->{changes}->{closed_updates}; } + if ($test->{changes}{title} || $test->{changes}{detail} || $test->{changes}{anonymous}) { + $mech->get_ok("/report/$report_id"); + $mech->content_contains("Anonymous: NoYes") if $test->{changes}{anonymous}; + $mech->content_contains("Details: Edited Detail for Report to Edit") if $test->{changes}{detail}; + $mech->content_contains("Subject: Edited Report to Edi") if $test->{changes}{title}; + } + is $report->$_, $test->{changes}->{$_}, "$_ updated" for grep { $_ ne 'username' } keys %{ $test->{changes} }; if ( $test->{user} ) { -- cgit v1.2.3