CodeIgniter Forums
using SimpleTest with Tank Auth - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Libraries & Helpers (
+--- Thread: using SimpleTest with Tank Auth (/showthread.php?tid=44123)

using SimpleTest with Tank Auth - El Forum - 08-04-2011

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:


The strange thing is if I do this in my test:

$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.