Changeset 1236 for trunk/t/13_cookies.t
- Timestamp:
- 10/19/08 16:24:04 (3 months ago)
- Files:
-
- 1 modified
-
trunk/t/13_cookies.t (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/t/13_cookies.t
r953 r1236 4 4 use Time::Piece; 5 5 use Time::Seconds; 6 use Test::More tests => 2 7;6 use Test::More tests => 29; 7 7 8 8 eval { OpenGuides::CGI->make_prefs_cookie; }; … … 31 31 track_recent_changes_views => "rc_pref", 32 32 display_google_maps => "gm_pref", 33 is_admin => "admin_pref", 33 34 ); 34 35 isa_ok( $cookie, "CGI::Cookie", "->make_prefs_cookie returns a cookie" ); … … 69 70 is( $prefs{display_google_maps}, "gm_pref", 70 71 "...and Google Maps display preference" ); 71 72 is( $prefs{is_admin}, "admin_pref", 73 "...and admin preference" ); 72 74 # Now make sure that true/false preferences are taken account of when 73 75 # they're false. … … 81 83 track_recent_changes_views => 0, 82 84 display_google_maps => 0, 85 is_admin => 0, 83 86 ); 84 87 … … 93 96 ok( !$prefs{track_recent_changes_views}, "...and recent changes prefs" ); 94 97 ok( !$prefs{display_google_maps}, "...and Google Maps prefs" ); 98 ok( !$prefs{is_admin}, "...and admin prefs" ); 95 99 96 100 # Check that cookie parsing fails nicely if no cookie set. … … 98 102 %prefs = eval { OpenGuides::CGI->get_prefs_from_cookie( config => $config ); }; 99 103 is( $@, "", "->get_prefs_from_cookie doesn't die if no cookie set" ); 100 is( keys %prefs, 1 0, "...and returns ten default values" );104 is( keys %prefs, 11, "...and returns ten default values" );
