Skip to content

How to login in request specs without sending requests #243

Answered by janko
Samuelodan asked this question in Q&A
Discussion options

You must be logged in to vote

Rodauth doesn't offer way to mocking login session in tests, similar to Clearance::Backdoor or Warden's on_next_request. In system tests I can imagine some overhead, though I would like to get some numbers from a real world app on what percentage of the test suite runtime is spent logging in, to motivate adding such functionality.

In requests specs I can imagine minimal overhead from actually hitting the login endpoint. Again, if you have some numbers on what amount of time goes to login compared to rest of the tests, that would be useful.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Samuelodan
Comment options

@janko
Comment options

Answer selected by Samuelodan
@Samuelodan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants