diff options
m--------- | commonlib | 0 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FiksGataMi.pm | 1 | ||||
-rw-r--r-- | t/i18n.t | 12 |
3 files changed, 12 insertions, 1 deletions
diff --git a/commonlib b/commonlib -Subproject eceed7e282edf5886dce3c1f306189134dc932f +Subproject 23a4417f75aa07042c5172dbd08bdbb2594afa5 diff --git a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm index 694e952f2..7fe27fd2e 100644 --- a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm +++ b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm @@ -196,7 +196,6 @@ sub reports_council_check { my @area_types = $c->cobrand->area_types; my $areas_k = mySociety::MaPit::call('areas', $kommune, type => \@area_types); my $areas_f = mySociety::MaPit::call('areas', $fylke, type => \@area_types); - use Data::Dumper; if (keys %$areas_f == 1) { ($fylke) = values %$areas_f; foreach (values %$areas_k) { @@ -106,4 +106,16 @@ sub utf8_diag { \@NO_sorted, "sort strcoll correctly with use locale 'nb_NO'" ); } +subtest "check that code is only called once by in_gb_locale" => sub { + + my $scalar_counter = 0; + my $out = mySociety::Locale::in_gb_locale { $scalar_counter++ }; + is $scalar_counter, 1, "code called once in scalar context"; + + my $list_counter = 0; + my @out = mySociety::Locale::in_gb_locale { $list_counter++ }; + is $list_counter, 1, "code called once in list context"; + +}; + done_testing(); |