aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-01-16 11:09:35 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-01-16 11:09:35 +0000
commit7ee6a869233e90c54ecce1863389bb5e5cb65b36 (patch)
treee06dd297f23d91d5ef3bb5a8f127e7ce8b1faeb0 /t
parent53624a3800db9500ad35900466aa44ad55e57c23 (diff)
parent922976648c7acf072f85716f5257a4bfcda35599 (diff)
Merge branch 'moderation-in-front-end-updates'
Diffstat (limited to 't')
-rw-r--r--t/app/controller/moderate.t9
1 files changed, 7 insertions, 2 deletions
diff --git a/t/app/controller/moderate.t b/t/app/controller/moderate.t
index 4eb72ed56..36a4bfbbd 100644
--- a/t/app/controller/moderate.t
+++ b/t/app/controller/moderate.t
@@ -257,8 +257,12 @@ subtest 'Problem moderation' => sub {
$report->discard_changes;
is $report->get_extra_metadata('weather'), 'snow';
is $report->get_extra_metadata('moon'), 'waning full';
- is $report->moderation_original_data->get_extra_metadata('moon'), 'waxing full';
- is $report->moderation_original_data->get_extra_metadata('weather'), undef;
+ my $mod = $report->moderation_original_data;
+ is $mod->get_extra_metadata('moon'), 'waxing full';
+ is $mod->get_extra_metadata('weather'), undef;
+
+ my $diff = $mod->extra_diff($report, 'moon');
+ is $diff, "wa<del style='background-color:#fcc'>x</del><ins style='background-color:#cfc'>n</ins>ing full", 'Correct diff';
};
subtest 'Moderate category' => sub {
@@ -327,6 +331,7 @@ sub create_update {
text => 'update good good bad good',
state => 'confirmed',
mark_fixed => 0,
+ confirmed => $dt,
});
}
my %update_prepopulated = (