/[Frey]/trunk/t/20-html.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

Contents of /trunk/t/20-html.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 23 - (show annotations)
Sun Jun 29 16:24:41 2008 UTC (15 years, 9 months ago) by dpavlin
File MIME type: application/x-troff
File size: 795 byte(s)
another major refactor and version bump [0.01]

- return 404 errors for resources which doesn't exist
- move HTML page wrapper is now in Fray::HTML->page
- dispatch to defined Template::Declare templates
- display available templates on status screen
- NOTE very clean and unobfuscated mapping
- a bits of documentation all over the place
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 use Test::More tests => 9;
6 use lib 'lib';
7
8 #use Devel::LeakTrace::Fast;
9 use Data::Dump qw/dump/;
10
11 BEGIN {
12 use_ok('Frey::HTML');
13 use_ok('Strix::User');
14 }
15
16 $Frey::HTML::debug = 1 if @ARGV;
17 my $debug = $Frey::HTML::debug;
18
19 ok( my $h1 = Frey::HTML->page( 'status' ), 'status' );
20 diag $h1 if $debug;
21
22 ok( Frey::HTML->add_javascript('static/jquery-1.2.6.js'), 'add_javascript' );
23
24 ok( my $h2 = Frey::HTML->page( 'status' ), 'status' );
25 diag $h2 if $debug;
26
27 cmp_ok( length( $h1 . '' ), '<', length( $h2 . '' ), 'bigger with javascript' );
28
29 ok( my $u = Strix::User->new( id => 1 ), 'Strix::User->new' );
30 isa_ok( $u, 'Strix::User' );
31
32 ok( my $h3 = Frey::HTML->page( 'user' => $u ), 'user' );
33 diag $h3 if $debug;
34
35 print Frey::HTML->page( 'status' ) if $debug;

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26