sentinel
sentinel copied to clipboard
Question: Feature testing with Wallaby and ExMachina
Good day,
I'm trying Sentinel out (works great!). Anyway, what's the best way to created logged in users when doing controller tests, feature tests?
@cubeguerrero - This is something I'd like to add a better way to handle in the future, but for now the best example I've got is the way I'm currently handling it in the existing tests, which isn't exactly pretty.
An example of that can be found here: https://github.com/britton-jb/sentinel/blob/master/test/controllers/html/account_controller_test.exs#L21
I haven't personally worked with Wallaby yet, it's on my list of things to do, so I can't speak to that exactly, but I'd imagine it would look similar.
@britton-jb thanks for getting back. Yeah, currently, that's what we did also. I basically copied your factory file and use that on our tests. We would love to help out with this, once we build/do something better, I'll post it here.