aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/uri_for.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/uri_for.t')
-rw-r--r--t/app/uri_for.t57
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();