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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 149 - (show annotations)
Wed Jul 16 21:23:27 2008 UTC (15 years, 9 months ago) by dpavlin
File MIME type: application/x-troff
File size: 727 byte(s)
partially working label editor in ObjectDesigner -- no save yet! [0.13]
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 my $debug = @ARGV ? 1 : 0;
6
7 use Test::More tests => 10;
8 use lib 'lib';
9
10 use Data::Dump qw/dump/;
11
12 BEGIN {
13 use_ok('Frey::Web::Editable');
14 use_ok('Strix::User');
15 }
16
17 ok( my $u = Frey::Web::Editable->new( name => 'test', value => 42 ), 'new' );
18 isa_ok( $u, 'Frey::Web::Editable' );
19
20 diag dump( $u ) if $debug;
21
22 ok( my @c = $u->meta->get_attribute_list , 'get_attribute_list' );
23 diag dump( @c ) if $debug;
24
25 ok( my $h1 = $u->process(), 'process view' );
26 diag $h1 if $debug;
27 like( $h1, qr|^42$|, 'view' );
28
29 $u->render_as('edit');
30 ok( my $h2 = $u->process(), 'process edit' );
31 diag $h2 if $debug;
32 like( $h2, qr|input.*42|, 'view' );
33
34 cmp_ok( length($h2), '>', length($h1), 'edit bigger' );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26