Hi all,
My unit tests and functional tests are failing because my tests aren’t
authenticated. I’m using using user engine and login engine.
How can I fake authentication to make my tests work properly.
Thanks,
Jason E.
Hi all,
My unit tests and functional tests are failing because my tests aren’t
authenticated. I’m using using user engine and login engine.
How can I fake authentication to make my tests work properly.
Thanks,
Jason E.
Jason E. wrote:
My unit tests and functional tests are failing because my tests aren’t
authenticated. I’m using using user engine and login engine.How can I fake authentication to make my tests work properly.
You’ll need to sneak an authenticated user into the session
@request.session[:user] = User.find_by_email(“[email protected]”)
best place for this is the suite’s setup method
zsombor
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs