aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_new.t
diff options
context:
space:
mode:
authorHakim Cassimally <hakim@mysociety.org>2015-02-13 17:12:21 +0000
committerMatthew Somerville <matthew@mysociety.org>2015-03-20 20:30:40 +0000
commit6d9c719d25e2450ee2f31a5f305b603c2f451594 (patch)
treeafc3b450191ce752cbe3ee67450875dba73e052e /t/app/controller/report_new.t
parent10b3a899af00205e46e177509a0b4c13bf746299 (diff)
Add Extra role to ease use of {extra} field.
Historically, the extra field has been used in two different ways by different cobrands, both as a list (e.g. Open311 category fields) and a hash (e.g. the Zurich cobrand). This commit consolidates usage, adding an API to make use of the field easier and always returning a hash for the code to use. Fixes #1018.
Diffstat (limited to 't/app/controller/report_new.t')
-rw-r--r--t/app/controller/report_new.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index 25fa01a1f..3e1446068 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -999,7 +999,7 @@ for my $test (
host => 'www.fixmystreet.com',
postcode => 'EH99 1SP',
fms_extra_title => '',
- extra => undef,
+ extra => [],
user_title => undef,
},
{
@@ -1127,7 +1127,7 @@ for my $test (
my $report = $user->problems->first;
ok $report, "Found the report";
- my $extras = $report->extra;
+ my $extras = $report->get_extra_fields;
is $user->title, $test->{'user_title'}, 'user title correct';
is_deeply $extras, $test->{extra}, 'extra contains correct values';