diff options
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/about.t | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/app/controller/about.t b/t/app/controller/about.t new file mode 100644 index 000000000..adbce8f25 --- /dev/null +++ b/t/app/controller/about.t @@ -0,0 +1,24 @@ +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_contains('FixMyStreet.com'); + +# 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_contains('The Empty Homes Agency'); + +# check that geting the page as EHA in welsh produces a different page +ok $mech->host("cy.reportemptyhomes.co.uk"), + 'change host to cy.reportemptyhomes'; +$mech->get_ok('/about'); +$mech->content_contains('Yr Asiantaeth Tai Gwag'); + +done_testing(); |