--- trunk/t/02-frey-web.t 2008/07/14 21:22:43 121 +++ trunk/t/02-frey-web.t 2008/07/17 17:04:21 154 @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 18; use lib 'lib'; use Data::Dump qw/dump/; @@ -28,9 +28,9 @@ ok( my $o = Mock->new( debug => $debug ), 'new' ); diag $o->dump(2) if $debug; -ok( $o->add_javascript( '/static/lib/Joose.js' ), 'add_javascript' ); +ok( $o->add_js( '/static/lib/Joose.js' ), 'add_js' ); -ok( my @js = $o->javascript, 'javascript' ); +ok( my @js = $o->js, 'js' ); diag dump( @js ) if $debug; @@ -43,3 +43,16 @@ like( $html, qr{text/css.*\.css}, 'have css' ); html_ok( $html, 'html lint' ); + +ok( my $s = $o->add_head( 'static/app.css' ), 'add_head css' ); +diag $s if $debug; +ok( $s = $o->add_head( 'static/js/ext-2.1/ext-all.js' ), 'add_head js' ); +diag $s if $debug; + +ok( my $html2 = $o->page( title => 'Test2', body => '' ), 'page' ); +diag $html2 if $debug; + +cmp_ok( length( $html ), '<', length( $html2 ), 'bigger html' ); + +like( $html2, qr{app\.css}, 'have css' ); +like( $html2, qr{ext}, 'have js' );