/[Arh]/t/00-action-ToggleEdit.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

Annotation of /t/00-action-ToggleEdit.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 23 - (hide annotations)
Fri Nov 30 23:23:14 2007 UTC (12 years, 8 months ago) by dpavlin
File MIME type: application/x-troff
File size: 695 byte(s)
another huge code dump:
- rename database columns to prevent conficts with standards
- added editing accessor to user which returns edit mode
- ToggleEdit action to change editing state (broken)
- tweaks all over templates to make units entry a breeze
- version bump [0.03]
1 dpavlin 23 #!/usr/bin/env perl
2     use warnings;
3     use strict;
4    
5     =head1 DESCRIPTION
6    
7     A (very) basic test harness for the ToggleEdit action.
8    
9     =cut
10    
11     use Jifty::Test tests => 10;
12     use Data::Dump qw/dump/;
13    
14     # Make sure we can load the action
15     use_ok('Arh::Action::ToggleEdit');
16    
17    
18     ok( my $web = Jifty::Test->web, 'web' );
19    
20     ok( $web->current_user->user_object->load_by_cols( email => 'admin@example.com' ), 'admin' );
21    
22     ok( ! $web->current_user->editing, 'edit off' );
23    
24     sub run_action {
25    
26     ok(my $a = $web->new_action(
27     class => 'ToggleEdit',
28     ), 'new_action ToggleEdit');
29    
30     ok( $a->run, 'run' );
31    
32     }
33    
34     run_action;
35     ok( $web->current_user->editing, 'edit on' );
36    
37     run_action;
38     ok( ! $web->current_user->editing, 'edit off' );
39    

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26