[eluser]jaykaneda[/eluser]
I am using Tank Auth for login and the Eric Barnes Simpletest implementation for unit testing. This is working fine for testing my models, but I'd like to add a few Web Tests to test my controllers. This is working for urls not behind my login, but I cannot get to those that are, and am always re-directed to auth, even when I am currently logged.
In my controller I have:
Code:
if($this->tank_auth->is_logged_in()){
$this->load->view('myView');
}else{
redirect('auth');
}
The strange thing is if I do this in my test:
Code:
$this->assertTrue($this->_ci->tank_auth->is_logged_in(),'user is logged in, so why the hell am I redirected to the auth controller?');
I get a green bar?
I was wondering if anyone has any experience of this, and could shed some light.