4 |
|
|
5 |
my $debug = shift @ARGV; |
my $debug = shift @ARGV; |
6 |
|
|
7 |
use Test::More tests => 14; |
use Test::More tests => 19; |
8 |
use lib 'lib'; |
use lib 'lib'; |
9 |
|
|
10 |
#use Devel::LeakTrace::Fast; |
#use Devel::LeakTrace::Fast; |
37 |
|
|
38 |
cmp_ok( $h1, 'ne', $h2, 'view and edit differs' ); |
cmp_ok( $h1, 'ne', $h2, 'view and edit differs' ); |
39 |
|
|
|
$u->render_as('view'); |
|
40 |
$u->_layout('table'); |
$u->_layout('table'); |
41 |
ok( my $h3 = $u->process(), 'process view/table' ); |
$u->render_as('view'); |
42 |
diag $h3 if $debug; |
ok( $h1 = $u->process(), 'process view/table' ); |
43 |
like( $h3, qr|<tr>|, 'tr' ); |
diag $h1 if $debug; |
44 |
|
like( $h1, qr|<tr>|, 'tr' ); |
45 |
|
|
46 |
$u->render_as('edit'); |
$u->render_as('edit'); |
47 |
ok( my $h4 = $u->process(), 'process edit/table' ); |
ok( $h2 = $u->process(), 'process edit/table' ); |
48 |
diag $h4 if $debug; |
diag $h2 if $debug; |
49 |
like( $h4, qr|<tr>|, 'tr' ); |
like( $h2, qr|<tr>|, 'tr' ); |
50 |
|
|
51 |
cmp_ok( $h3, 'ne', $h4, 'view and edit differs' ); |
cmp_ok( $h1, 'ne', $h2, 'view and edit differs' ); |
52 |
|
|
53 |
|
$u->_layout('columns'); |
54 |
|
$u->render_as('view'); |
55 |
|
ok( $h1 = $u->process(), 'process view/table' ); |
56 |
|
diag $h1 if $debug; |
57 |
|
like( $h1, qr|<tr>|, 'tr' ); |
58 |
|
|
59 |
|
$u->render_as('edit'); |
60 |
|
ok( $h2 = $u->process(), 'process edit/table' ); |
61 |
|
diag $h2 if $debug; |
62 |
|
like( $h2, qr|<tr|, 'tr' ); |
63 |
|
|
64 |
|
cmp_ok( $h1, 'ne', $h2, 'view and edit differs' ); |
65 |
|
|