Hello,

I am having the same issue as his. I tried importing the controller
and do

                //$this->Users = new UsersController();
                //$this->Users->Auth->allow('*');

but I get an error: Call to a member function allow() on a non object

The difference with mine is that I don't get redirected to the app's
login page. It just gives me the page for the Core Group Test.

pragnatek, please let me know if you have figured out how to work
around it. Thanks. -hans

On Dec 17 2008, 9:58 am, pragnatek <[email protected]> wrote:
> Hi,
>
> I'm writing my firstControllerunit tests, having now got Model & 
> Webtestingrunning :)
> I can get theControllerunit test example in the cookbook running on
> a simple userscontroller(http://book.cakephp.org/view/366/Testing-
> controllers).
>
> However once I have included the Auth component in my app_controller/
> users_controller I run into problems.
> For example, if now run the following test:
>
>    function testIndex() {
>      $result = $this->testAction('/users/index');
>      debug($result);
>    }
>
>  Firstly I get redirect to the application's login page.
>  If I then login with valid account details and then re-run the test,
> test runs but $result is null.
>
>  Can anyone please advise how I should be structuring these tests to
> work with Auth?
>
>  Thanks,
>  Andy

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to