Here's my UsersController test case:
There's nothing special about my UsersController, but it uses the SecurityComponent (inherited from AppController).
And when I run the tests, i get the infamous:
The request has been black-holedTest case: UsersControllerTestCase(testAdminSearchStudents)
I think it's because i'm forging a POST request without the CSRF token and referal?
What should I do to make this work without removing the Security component from my Controller?
I'm not sure if this will help, but here's the important part of the stack trace:
/var/www/source/cakephp/lib/Cake/Controller/Component/SecurityComponent.php : 230SecurityComponent::startup/var/www/source/cakephp/lib/Cake/Utility/ObjectCollection.php : 130ObjectCollection::trigger/var/www/source/cakephp/lib/Cake/Event/CakeEventManager.php : 246/var/www/source/cakephp/lib/Cake/Controller/Controller.php : 671/var/www/source/cakephp/lib/Cake/Routing/Dispatcher.php : 183/var/www/source/cakephp/lib/Cake/Routing/Dispatcher.php : 161/var/www/source/cakephp/lib/Cake/TestSuite/ControllerTestCase.php : 271ControllerTestCase::_testAction/var/www/source/cakephp/lib/Cake/TestSuite/ControllerTestCase.php : 189
Regards,
--
Thiago Belem
Desenvolvedor
Rio de Janeiro - RJ - Brasil
-- Thiago Belem
Desenvolvedor
Rio de Janeiro - RJ - Brasil
Assando Sites - Curso online de CakePHP
assando-sites.com.br
thiagobelem.net
contato@thiagobelem.net
Skype / gTalk » thiago.belem.web
LinkedIn » br.linkedin.com/in/thiagobelem/pt
thiagobelem.net
contato@thiagobelem.net
Skype / gTalk » thiago.belem.web
LinkedIn » br.linkedin.com/in/thiagobelem/pt
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
No comments:
Post a Comment