/[Frey]/trunk/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 /trunk/t/01-frey-action.t

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

revision 386 by dpavlin, Mon Nov 17 22:40:22 2008 UTC revision 502 by dpavlin, Mon Nov 24 21:49:38 2008 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 => 20;  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 47  ok( $o = Frey::Action->new( class => 'Fr Line 48  ok( $o = Frey::Action->new( class => 'Fr
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' );
51    
52    ok( $o = Frey::Action->new( class => 'Frey::Introspect', debug => $debug ), "new Frey::Introspect" );
53    ok( $html = $o->params_form, 'params_form' );
54    diag $html if $debug;
55    like( $html, qr/class/, 'required form field class' );
56    
57    ok( $o = Frey::Action->new( class => 'Frey::Introspect', params => { class => 'Frey' }, debug => $debug ), "new Frey::Introspect" );
58    ok( ! $o->params_form, 'params_form empty' );
59    
60    

Legend:
Removed from v.386  
changed lines
  Added in v.502

  ViewVC Help
Powered by ViewVC 1.1.26