[testbox 1.0.0] How to test secure event.

Hi All,
I am totally new to testing and on learning phase. For now I am using testbox for test case. Can anyone guide me how can I test secure events?
Following thing I tried but didn’t work for me.

  1. In beforeEach() I tried to call secure.douserlogin (which basically perform login for user) to make sure user is logged in before each test.
  2. it() call my secured event.

but in this case it always fails because of it redirecting to my default login event.

I am using ColdBox security interceptor for securing event.

Thanks in advance.

  • Pritesh

PRitesh in integration testing you need to make sure you follow all steps as it is actually testing the application in its full state.

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Thanks Luis, I was following steps but some how it wasn’t validating for some reason but another day it start working, not sure what changes I have made before it start working. Anyway it is working fine now and falling in love with testbox :).

Thanks for your all effort.

-Pritesh