You can clone with
HTTPS or Subversion.
I had a very hard time trying to figure out what was causing my test to fail. I was creating a user inside a test with Factory_girl, and this was causing the UserSession.find to get populated.
context "an anonymous user" do
should "request a password reset by username" do
user = Factory.create(:user, :username => "mike")
UserSession.find.destroy # I had to introduce this to ensure nobody is logged in!
post :reset_request, :username => 'mike'
Is it an expected behaviour? If so, maybe it's worth two lines in the quickstart or in the test app.
@freegenie You should have to call UserSession.create(user) for the UserSession to exist.
Does this still happen? If you run just a single test, does it happen? Maybe the session is leaking from a different test.
Ahhh, I might have run into this as well before. It might actually be session maintenance when the persistence token is being set for the first time when the user model is created in the factory. Either turning maintain_sessions=false in your model, or, this patch might work (and if so, maybe we should patch authlogic):
super && !persistence_token_was.nil?
honestly, you can close this issue for me. I don't even remember.