File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
cake/tests/cases/libs/controller/components Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -900,6 +900,16 @@ function testAllowedActionsWithCamelCaseMethods() {
900
900
$ result = $ this ->Controller ->Auth ->startup ($ this ->Controller );
901
901
$ this ->assertFalse ($ result , 'startup() should return false, as action is not allowed. %s ' );
902
902
903
+ $ url = '/auth_test/delete ' ;
904
+ $ this ->Controller ->params = Router::parse ($ url );
905
+ $ this ->Controller ->params ['url ' ]['url ' ] = Router::normalize ($ url );
906
+ $ this ->Controller ->Auth ->initialize ($ this ->Controller );
907
+ $ this ->Controller ->Auth ->loginAction = array ('controller ' => 'AuthTest ' , 'action ' => 'login ' );
908
+ $ this ->Controller ->Auth ->userModel = 'AuthUser ' ;
909
+
910
+ $ this ->Controller ->Auth ->allow (array ('delete ' , 'add ' ));
911
+ $ result = $ this ->Controller ->Auth ->startup ($ this ->Controller );
912
+ $ this ->assertTrue ($ result , 'startup() should return true, as action is allowed. %s ' );
903
913
}
904
914
905
915
function testAllowedActionsSetWithAllowMethod () {
@@ -909,7 +919,6 @@ function testAllowedActionsSetWithAllowMethod() {
909
919
$ this ->Controller ->Auth ->initialize ($ this ->Controller );
910
920
$ this ->Controller ->Auth ->allow ('action_name ' , 'anotherAction ' );
911
921
$ this ->assertEqual ($ this ->Controller ->Auth ->allowedActions , array ('action_name ' , 'anotheraction ' ));
912
-
913
922
}
914
923
915
924
/**
You can’t perform that action at this time.
0 commit comments