/[Frey]/trunk/t/02-frey-web.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/02-frey-web.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 155 by dpavlin, Thu Jul 17 17:04:21 2008 UTC revision 156 by dpavlin, Thu Jul 17 17:55:39 2008 UTC
# Line 28  isa_ok( Frey::Web->meta, 'Moose::Meta::R Line 28  isa_ok( Frey::Web->meta, 'Moose::Meta::R
28  ok( my $o = Mock->new( debug => $debug ), 'new' );  ok( my $o = Mock->new( debug => $debug ), 'new' );
29  diag $o->dump(2) if $debug;  diag $o->dump(2) if $debug;
30    
31  ok( $o->add_js( '/static/lib/Joose.js' ), 'add_js' );  ok( $o->add_head( '/static/lib/Joose.js' ), 'add_head js' );
32    
33  ok( my @js = $o->js, 'js' );  ok( my @head = $o->head, 'js' );
34    
35  diag dump( @js ) if $debug;  diag dump( @head ) if $debug;
36    
37  ok( $o->add_css( '/static/introspect.css' ), 'add_css' );  ok( $o->add_head( '/static/introspect.css' ), 'add_head css' );
38    
39  ok( my $html = $o->page( title => 'Test', body => '<!-- in-body -->' ), 'page' );  ok( my $html = $o->page( title => 'Test', body => '<!-- in-body -->' ), 'page' );
40  diag $html if $debug;  diag $html if $debug;
# Line 44  like( $html, qr{text/css.*\.css}, 'have Line 44  like( $html, qr{text/css.*\.css}, 'have
44    
45  html_ok( $html, 'html lint' );  html_ok( $html, 'html lint' );
46    
47  ok( my $s = $o->add_head( 'static/app.css' ), 'add_head css' );  ok( my $s = $o->add_head( 'static/frey.css' ), 'add_head css' );
48  diag $s if $debug;  diag $s if $debug;
49  ok( $s = $o->add_head( 'static/js/ext-2.1/ext-all.js' ), 'add_head js' );  ok( $s = $o->add_head( 'static/js/ext-2.1/ext-all.js' ), 'add_head js' );
50  diag $s if $debug;  diag $s if $debug;
# Line 54  diag $html2 if $debug; Line 54  diag $html2 if $debug;
54    
55  cmp_ok( length( $html ), '<', length( $html2 ), 'bigger html' );  cmp_ok( length( $html ), '<', length( $html2 ), 'bigger html' );
56    
57  like( $html2, qr{app\.css}, 'have css' );  like( $html2, qr{frey\.css}, 'have css' );
58  like( $html2, qr{ext}, 'have js' );  like( $html2, qr{ext}, 'have js' );

Legend:
Removed from v.155  
changed lines
  Added in v.156

  ViewVC Help
Powered by ViewVC 1.1.26