diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-05-29 15:57:41 +0100 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-05-29 15:57:41 +0100 |
commit | 67da8efc720d2d0bd22bd9fe8655b7e983b35bb4 (patch) | |
tree | 38b8570647124df06c637d4b923f6010211ef328 /t/app/uri_for.t | |
parent | 40b3a51d33caefa8f5fb97ce9be18ef936c7e260 (diff) | |
parent | 131ff6e9bf3626d6a8fff6ae54669d250148a63a (diff) |
Merge remote branch 'origin/master' into fmb-read-only
Conflicts:
bin/send-reports
perllib/FixMyStreet/Cobrand/Default.pm
perllib/FixMyStreet/Cobrand/FixMyStreet.pm
templates/web/fixmystreet/alert/index.html
templates/web/fixmystreet/around/display_location.html
web/cobrands/fixmystreet/_layout.scss
web/js/map-OpenLayers.js
Diffstat (limited to 't/app/uri_for.t')
-rw-r--r-- | t/app/uri_for.t | 57 |
1 files changed, 31 insertions, 26 deletions
diff --git a/t/app/uri_for.t b/t/app/uri_for.t index 51a6e8a0e..eecf30e32 100644 --- a/t/app/uri_for.t +++ b/t/app/uri_for.t @@ -78,31 +78,36 @@ is( 'FiksGataMi url with lat not zoom' ); -like( - $reh_en_c->uri_for_email( '/foo' ), - qr{^http://en.}, - 'adds en to retain language' -); - -# instantiate this here otherwise sets locale to cy and breaks test -# above -my $reh_cy_c = FixMyStreet::App->new( - { - request => Catalyst::Request->new( - { - base => URI->new('http://cy.reportemptyhomes.com/'), - uri => URI->new('http://cy.reportemptyhomes.com/test_namespace') - } - ), - namespace => 'test_namespace', - } -); -$reh_cy_c->setup_request(); - -like( - $reh_cy_c->uri_for_email( '/foo' ), - qr{^http://cy.}, - 'retains language' -); +SKIP: { + skip( "Need 'emptyhomes' in ALLOWED_COBRANDS config", 2 ) + unless FixMyStreet::Cobrand->exists('emptyhomes'); + + like( + $reh_en_c->uri_for_email( '/foo' ), + qr{^http://en.}, + 'adds en to retain language' + ); + + # instantiate this here otherwise sets locale to cy and breaks test + # above + my $reh_cy_c = FixMyStreet::App->new( + { + request => Catalyst::Request->new( + { + base => URI->new('http://cy.reportemptyhomes.com/'), + uri => URI->new('http://cy.reportemptyhomes.com/test_namespace') + } + ), + namespace => 'test_namespace', + } + ); + $reh_cy_c->setup_request(); + + like( + $reh_cy_c->uri_for_email( '/foo' ), + qr{^http://cy.}, + 'retains language' + ); +} done_testing(); |