I've a custom workflow after authentication and I would like to test it.
On initialiser I got something like
Warden::Manager.after_authentication do |user, auth, _opts|
next unless user.ban?
auth.logout
throw(:warden, :message => "You're currently ban. Impossible to connect")
end
I think it's read the whole documentation without finding a correct way to test it. Any idea?
I finally found a way. Not that obvious. Let me share it with you.
According to the source warden/hooks.rb#L71-L78
So here is my workaround.
Enjoy testing!