Changeset 13561 for trunk/UnitTestContrib/test/unit/Fn_USERINFO.pm
- Timestamp:
- 01/08/12 02:12:19 (17 months ago)
- File:
-
- 1 edited
-
trunk/UnitTestContrib/test/unit/Fn_USERINFO.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/UnitTestContrib/test/unit/Fn_USERINFO.pm
r13116 r13561 99 99 } 100 100 101 sub test_antispam { 102 my $this = shift; 103 my $testformat = 104 'W$wikiusernameU$wikinameN$usernameE$emailsG$groupsA$adminIA$isadminIG$isgroupE$bogustoken nop$nopnop $percent $quot $comma$n$n()ewline $lt $gt $amp $dollar'; 105 106 $Foswiki::cfg{AntiSpam}{HideUserDetails} = 1; 107 108 # ScumBag should only see his own information 109 $this->createNewFoswikiSession( "ScumBag" ); 110 my $ui = $this->{test_topicObject}->expandMacros(<<"HERE"); 111 %USERINFO{"ScumBag" format="$testformat"}% 112 HERE 113 $this->assert_str_equals( <<"HERE", $ui ); 114 W$Foswiki::cfg{UsersWebName}.ScumBagUScumBagNscumEscumbag\@example.comGFriendsOfFriendsOfGropeGroup, FriendsOfGropeGroup, GropeGroupAfalseIAfalseIGfalseE\$bogustoken nopnop % " , 115 116 ewline < > & \$ 117 HERE 118 119 my $guest_ui = $this->{test_topicObject}->expandMacros(<<"HERE"); 120 %USERINFO{"WikiGuest" format="$testformat"}% 121 HERE 122 123 #'W$wikiusernameU$wikinameN$usernameE$emailsG$groupsA$adminIA$isadminIG$isgroupE$bogustoken nop$nopnop $percent $quot $comma$n$n()ewline $lt $gt $amp $dollar'; 124 $this->assert_str_equals( <<"HERE", $guest_ui ); 125 W$Foswiki::cfg{UsersWebName}.WikiGuestUWikiGuestNEGAIAIGfalseE\$bogustoken nopnop % " , 126 127 ewline < > & \$ 128 HERE 129 130 # Admin user should see everything 131 $this->createNewFoswikiSession( $Foswiki::cfg{AdminUserLogin} ); 132 $ui = $this->{test_topicObject}->expandMacros(<<"HERE"); 133 %USERINFO{"ScumBag" format="$testformat"}% 134 HERE 135 $this->assert_str_equals( <<"HERE", $ui ); 136 W$Foswiki::cfg{UsersWebName}.ScumBagUScumBagNscumEscumbag\@example.comGFriendsOfFriendsOfGropeGroup, FriendsOfGropeGroup, GropeGroupAfalseIAfalseIGfalseE\$bogustoken nopnop % " , 137 138 ewline < > & \$ 139 HERE 140 141 $guest_ui = $this->{test_topicObject}->expandMacros(<<"HERE"); 142 %USERINFO{"WikiGuest" format="$testformat"}% 143 HERE 144 $this->assert_str_equals( <<"HERE", $guest_ui ); 145 W$Foswiki::cfg{UsersWebName}.WikiGuestUWikiGuestNguestEGBaseGroup, FriendsOfFriendsOfGropeGroup, FriendsOfGropeGroup, GropeGroupAfalseIAfalseIGfalseE\$bogustoken nopnop % " , 146 147 ewline < > & \$ 148 HERE 149 150 return; 151 } 152 101 153 sub test_isgroup { 102 154 my $this = shift;
Note: See TracChangeset
for help on using the changeset viewer.
