diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-10 14:56:00 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-10 14:56:00 +0100 |
commit | 391ca1c469d93bb2c4798cc15e56fc495b5e80dd (patch) | |
tree | 6bc90fae589de824095e668fbf510ef259935729 /t/app/controller/about.t | |
parent | 7c96f8ec61d6eddc211f3f0e71cdb276c6a5f773 (diff) | |
parent | 860383f0de3287b0666d64a3ffff3db3a0f087ae (diff) |
Merge branch 'migrate_to_catalyst' into reportemptyhomes
Diffstat (limited to 't/app/controller/about.t')
-rw-r--r-- | t/app/controller/about.t | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/app/controller/about.t b/t/app/controller/about.t new file mode 100644 index 000000000..a5fb215d3 --- /dev/null +++ b/t/app/controller/about.t @@ -0,0 +1,31 @@ +use strict; +use warnings; + +use Test::More; +use Test::WWW::Mechanize::Catalyst 'FixMyStreet::App'; + +ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'Created mech object' ); + +# check that we can get the page +$mech->get_ok('/about'); +$mech->content_like(qr{About us ::\s+FixMyStreet}); +$mech->content_contains('html lang="en-gb"'); + +SKIP: { + skip( "Need 'emptyhomes' in ALLOWED_COBRANDS config", 8 ) + unless FixMyStreet::App->config->{ALLOWED_COBRANDS} =~ m{emptyhomes}; + + # check that geting the page as EHA produces a different page + ok $mech->host("reportemptyhomes.co.uk"), 'change host to reportemptyhomes'; + $mech->get_ok('/about'); + $mech->content_like(qr{About us ::\s+Report Empty Homes}); + $mech->content_contains('html lang="en-gb"'); + + # check that geting the page as EHA in welsh produces a different page + ok $mech->host("cy.reportemptyhomes.co.uk"), 'host to cy.reportemptyhomes'; + $mech->get_ok('/about'); + $mech->content_like(qr{Amdanom ni ::\s+Adrodd am Eiddo Gwag}); + $mech->content_contains('html lang="cy"'); +} + +done_testing(); |