diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-05-16 15:47:42 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-05-16 15:47:42 +0100 |
commit | 23aa50cd6e1fb77de2d1e3ae8d29a8f8408a7930 (patch) | |
tree | 511442f4c72e6d0968171631a0f0305893ac0a53 /t/app/uri_for.t | |
parent | a48756f51e0199bf09ce7cbd66c2fcd80acb05ad (diff) |
Fixes and improvements for tests.
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(); |