/[Frey]/branches/zimbardo/t/01-Frey-Action.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 /branches/zimbardo/t/01-Frey-Action.t

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

revision 469 by dpavlin, Thu Nov 20 10:50:28 2008 UTC revision 927 by dpavlin, Mon Jan 5 23:12:22 2009 UTC
# Line 4  use warnings; Line 4  use warnings;
4    
5  my $debug = @ARGV ? 1 : 0;  my $debug = @ARGV ? 1 : 0;
6    
7  use Test::More tests => 25;  use Test::More tests => 26;
8  use lib 'lib';  use lib 'lib';
9    
10  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
# Line 28  ok( ! $o->params->{uri}, 'no uri' ); Line 28  ok( ! $o->params->{uri}, 'no uri' );
28  ok( my $html = $o->params_form, 'params_form' );  ok( my $html = $o->params_form, 'params_form' );
29  diag $html if $debug;  diag $html if $debug;
30  like( $html, qr/<form/, 'has form' );  like( $html, qr/<form/, 'has form' );
31    unlike( $html, qr/HASH/, 'no HASH' );
32    
33  ok( ! $o->params->{uri}, "don't pollute params" );  ok( ! $o->params->{uri}, "don't pollute params" );
34    
# Line 43  ok( $html2, 'got form again' ); Line 44  ok( $html2, 'got form again' );
44  cmp_ok( $html, 'eq', $html2, 'html same' );  cmp_ok( $html, 'eq', $html2, 'html same' );
45  ok( $default->{uri}, 'uri has default' );  ok( $default->{uri}, 'uri has default' );
46    
47  ok( $o = Frey::Action->new( class => 'Frey::ClassBrowser', debug => $debug, params => { unneeded => 1 } ), "new Frey::ClassBrowser" );  ok( $o = Frey::Action->new( class => 'Frey::Class::Browser', debug => $debug, params => { unneeded => 1 } ), "new Frey::Class::Browser" );
48  ok( ($html2,$default) = $o->params_form, 'params_form' );  ok( ($html2,$default) = $o->params_form, 'params_form' );
49  ok( ! $html2, 'no form' );  ok( ! $html2, 'no form' );
50  ok( $default->{unneeded}, 'preserve params' );  ok( $default->{unneeded}, 'preserve params' );

Legend:
Removed from v.469  
changed lines
  Added in v.927

  ViewVC Help
Powered by ViewVC 1.1.26