diff options
Diffstat (limited to 't/app/uri_for.t')
-rw-r--r-- | t/app/uri_for.t | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/t/app/uri_for.t b/t/app/uri_for.t index bf965fb62..810aade62 100644 --- a/t/app/uri_for.t +++ b/t/app/uri_for.t @@ -44,25 +44,29 @@ is( 'FiksGataMi url with lat not zoom' ); -SKIP: { - skip( "Need 'emptyhomes' in ALLOWED_COBRANDS config", 2 ) - unless FixMyStreet::Cobrand->exists('emptyhomes'); - +FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'emptyhomes' ], +}, sub { 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 = ctx_request('http://cy.reportemptyhomes.com/'); +# instantiate this here otherwise sets locale to cy and breaks test +# above +my $reh_cy_c; +FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'emptyhomes' ], +}, sub { + $reh_cy_c = ctx_request('http://cy.reportemptyhomes.com/'); like( $reh_cy_c->uri_for_email( '/foo' ), qr{^http://cy.}, 'retains language' ); -} +}; done_testing(); |