aboutsummaryrefslogtreecommitdiffstats
path: root/t/Page.t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-07 16:46:19 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-07 16:46:19 +0100
commit0f7de6563d4c96fa1ec9c429cca7e42259e25422 (patch)
tree44383db10edd2136e471bba208170550d095b97d /t/Page.t
parenta82a51695eacf94b7523502b3a48e1de6836fec0 (diff)
parent77460615cf9d08175e385ada6e03ba96b512c935 (diff)
Merge branch 'migrate_to_catalyst' of ssh://git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
Diffstat (limited to 't/Page.t')
-rwxr-xr-xt/Page.t31
1 files changed, 1 insertions, 30 deletions
diff --git a/t/Page.t b/t/Page.t
index 5e55b8e1f..9331d4ef9 100755
--- a/t/Page.t
+++ b/t/Page.t
@@ -11,7 +11,7 @@
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More tests => 4;
use Test::Exception;
use FindBin;
@@ -36,33 +36,6 @@ sub set_lang($) {
mySociety::Locale::change();
}
-sub test_header() {
- my $q = mock_query();
- my $html;
- my %params = (title => 'test title');
- set_lang('en-gb,English,en_GB');
-
- # Test that param that isn't explicitly allowed raises error
- $params{'test-param'} = 'test';
- throws_ok { Page::header($q, %params); } qr/bad parameter/, 'bad parameter caught ok';
- delete $params{'test-param'};
-
- # Test that template passed is rendered
- $params{'template'} = 'test';
- $html = Page::template_include('test-header', $q,
- '/../t/templates/' . $q->{site} . '/',
- title => 'My test title', lang => 'en-gb'
- );
-
- like ($html, qr/My test header template/, 'named template rendered ok');
-
- return 1;
-}
-
-sub test_footer(){
- return 1;
-}
-
sub test_base_url_with_lang {
set_lang('en-gb,English,en_GB');
my $q = mock_query();
@@ -80,5 +53,3 @@ sub test_base_url_with_lang {
ok(test_base_url_with_lang() == 1, 'Ran all tests for base_url_with_lang');
-ok(test_footer() == 1, 'Ran all tests for the footer function');
-ok(test_header() == 1, 'Ran all tests for the header function');