We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In some scenarios, I need to test a controller as an anonymous user. However, I'm getting this error if the method set_user is not called.
set_user
it 'works' do get :index end
NoMethodError: undefined method `cookies' for {}:Hash
When I set a user everything is working properly:
it 'works' do warden.set_user("user_id", User.first.id) get :index end
Is there something I'm missing? How is it supposed to test a private controller using an anonymous user?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In some scenarios, I need to test a controller as an anonymous user. However, I'm getting this error if the method
set_user
is not called.When I set a user everything is working properly:
Is there something I'm missing? How is it supposed to test a private controller using an anonymous user?
The text was updated successfully, but these errors were encountered: