Are init scripts called before running functional tests?

24 views
Skip to first unread message

tome...@gmail.com

unread,
Aug 21, 2014, 12:02:13 PM8/21/14
to chica...@googlegroups.com
Hi!

I have an application, which creates default admin account, when it is first run.
It does by calling init script in priv/init.
The script checks, if there are any admin accounts
and if there is none, than it creates one.
I wanted to test logging in, but I am getting invalid login/password with following line:

Database: []

Are init scripts called before running functional tests?
Can I somehow call init script manually?
If I can't. How can I ensure, that there is some data before testing starts.
(Of course my application does not permit creating admin accounts, if you are not admin)

tome...@gmail.com

unread,
Aug 30, 2014, 4:00:57 AM8/30/14
to chica...@googlegroups.com, tome...@gmail.com
They are not. I moved my logic to controller.
It will be called each time user visits that page,
but this is not a big overhead.
Reply all
Reply to author
Forward
0 new messages