I’m trying to test my registration controller (which overrides Devise’s built in controller) but when I do the following test:
test "should create user" do
post :create, user: { email: "temp12345@email.com", first_name: @user.first_name}
assert_redirected_to user_path(assigns(:user))
end
However, the response coming back says “You must sign up/sign in to continue” which makes no sense as I can do this manually from the browser to sign up a user.
Any ideas?
Just had the same issue. Answer is in the devise docs: