diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-12-09 12:40:06 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-12-09 14:16:22 +0000 |
commit | afad42bf0227966dedfdbd7272e8cf7fc5e53cc0 (patch) | |
tree | c38a876558adb2a526ad5bac0a7771b2a4b77d7e /t | |
parent | b064b041675c907a5646487985825f078208f4d4 (diff) |
Switch template plugin for nice numbers.
Template::Plugin::Number::Format works internationally, whilst
Template::Plugin::Comma does not.
Diffstat (limited to 't')
-rw-r--r-- | t/app/01app.t | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/t/app/01app.t b/t/app/01app.t index 02ffcd217..eb98b6319 100644 --- a/t/app/01app.t +++ b/t/app/01app.t @@ -1,10 +1,27 @@ #!/usr/bin/env perl + use strict; use warnings; -use Test::More; +package FixMyStreet::Cobrand::Tester; +use parent 'FixMyStreet::Cobrand::FiksGataMi'; +sub front_stats_data { { new => 0, fixed => 0, updates => 12345 } } + +package main; + +use Test::More; use Catalyst::Test 'FixMyStreet::App'; +use charnames ':full'; +use Encode qw(encode); ok( request('/')->is_success, 'Request should succeed' ); +FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'tester' ], +}, sub { + my $page = get('/'); + my $num = encode('UTF-8', "12\N{NO-BREAK SPACE}345"); + like $page, qr/$num/; +}; + done_testing(); |