--- trunk/t/11-strix-view-user.t 2008/07/11 10:29:31 95 +++ trunk/t/20-frey-web-crud.t 2008/11/26 07:57:12 532 @@ -2,20 +2,24 @@ use strict; use warnings; -my $debug = shift @ARGV; +my $debug = @ARGV ? 1 : 0; -use Test::More tests => 19; +use Test::More tests => 21; use lib 'lib'; #use Devel::LeakTrace::Fast; use Data::Dump qw/dump/; BEGIN { - use_ok('Strix::View::User'); + use_ok('Frey::Web::CRUD'); + use_ok('Strix::User'); } -ok( my $u = Strix::View::User->new( id => 1, ime => 'foo', prezime => 'bar' ), 'new' ); -isa_ok( $u, 'Strix::View::User' ); +ok( my $fey = Strix::User->new( id => 1, ime => 'foo', prezime => 'bar' ), 'Strix::User' ); +diag dump( $fey ) if $debug; + +ok( my $u = Frey::Web::CRUD->new( fey_class => ref($fey), fey => $fey ), 'new' ); +isa_ok( $u, 'Frey::Web::CRUD' ); diag dump( $u ) if $debug; @@ -23,7 +27,7 @@ diag dump( @c ) if $debug; #while ( $u = $i->next ) { -# isa_ok( $u, 'Strix::View::User' ); +# isa_ok( $u, 'Frey::Web::CRUD' ); #} ok( my $h1 = $u->process(), 'process view/div' ); @@ -37,7 +41,7 @@ cmp_ok( $h1, 'ne', $h2, 'view and edit differs' ); -$u->_layout('table'); +$u->layout('table'); $u->render_as('view'); ok( $h1 = $u->process(), 'process view/table' ); diag $h1 if $debug; @@ -50,7 +54,7 @@ cmp_ok( $h1, 'ne', $h2, 'view and edit differs' ); -$u->_layout('columns'); +$u->layout('columns'); $u->render_as('view'); ok( $h1 = $u->process(), 'process view/table' ); diag $h1 if $debug;