aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-11-20 16:40:53 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-11-26 12:49:23 +0000
commiteb2aba46eabc8d90656b760cf4900f56119de9ca (patch)
treeafdf23b1a49424aa0c46019f8354f46b778dcf5c /t
parentd04d807989eaedb1bd46d08bf80e1b42ed7800ae (diff)
Store all moderation change history in database.
Currently keeping the same front end functionality of only reverting to the original.
Diffstat (limited to 't')
-rw-r--r--t/app/controller/moderate.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/app/controller/moderate.t b/t/app/controller/moderate.t
index e80355075..57ae26047 100644
--- a/t/app/controller/moderate.t
+++ b/t/app/controller/moderate.t
@@ -126,6 +126,11 @@ subtest 'Problem moderation' => sub {
$report->discard_changes;
is $report->title, 'Good bad good';
is $report->detail, 'Good bad bad bad good bad';
+
+ my @history = $report->moderation_original_datas->search(undef, { order_by => 'id' })->all;
+ is @history, 2, 'Right number of entries';
+ is $history[0]->title, 'Good bad good', 'Correct original title';
+ is $history[1]->title, 'Good good', 'Correct second title';
};
subtest 'Make anonymous' => sub {