Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating user automatically logs user in during tests #145

Closed
crystalneth opened this issue Jun 6, 2010 · 1 comment
Closed

Creating user automatically logs user in during tests #145

crystalneth opened this issue Jun 6, 2010 · 1 comment

Comments

@crystalneth
Copy link

Calling User.create has the side effect of logging the user in because of the call:

before_save :maintain_sessions

in session_maintenance.rb

This could be a major issue in a number of circumstances, but caused me quite a bit of trouble when trying to figure out why my tests were failing when I created a user in the setup method. Some tests with require_no_user or otherwise requiring a user not be logged in are affected.

@tiegz
Copy link
Collaborator

tiegz commented Oct 8, 2014

Old ticket, closing this up. You can use the User.maintain_sessions = false option now.

@tiegz tiegz closed this as completed Oct 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants