aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2020-06-16 16:23:03 +0100
committerDave Arter <davea@mysociety.org>2020-07-02 14:38:50 +0100
commit832dd8e367b9c83619981bf9828dea405d15ce02 (patch)
treef7d485189a0a8640f273f34fed11029e201b1b3d /t/app/controller
parentaad79063d6e01f7596da564b274b3bf78413fdfa (diff)
Display contents of lists in report extra data in admin
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/admin/report_edit.t20
1 files changed, 16 insertions, 4 deletions
diff --git a/t/app/controller/admin/report_edit.t b/t/app/controller/admin/report_edit.t
index 01f091412..f8101ab76 100644
--- a/t/app/controller/admin/report_edit.t
+++ b/t/app/controller/admin/report_edit.t
@@ -686,16 +686,28 @@ subtest "Test display of fields extra data" => sub {
$mech->get_ok("/admin/report_edit/$report_id");
$mech->content_contains('Extra data: No');
- $report->push_extra_fields( {
- name => 'report_url',
- value => 'http://example.com',
- });
+ $report->push_extra_fields(
+ {
+ name => 'report_url',
+ value => 'http://example.com',
+ },
+ {
+ name => 'sent_to',
+ value => [ 'onerecipient@example.org' ],
+ },
+ {
+ name => 'sent_too',
+ value => [ 'onemorerecipient@example.org', 'another@example.org' ],
+ },
+ );
$report->update;
$report->discard_changes;
$mech->get_ok("/admin/report_edit/$report_id");
$mech->content_contains('report_url</strong>: http://example.com');
+ $mech->content_contains('sent_to</strong>: onerecipient@example.org');
+ $mech->content_contains('sent_too</strong>: onemorerecipient@example.org, another@example.org');
$report->set_extra_fields( {
description => 'Report URL',