Closed jonibatista closed 2 years ago
I was messing the user at params
test 'POST create' do
assert_difference 'User.count' do
post '/users', params: { user: { name: "Jóni", email: "mail@mail",
password: "secrets", password_confirmation: "secrets" } }
end
assert_redirected_to root_url
end
Then I realize that by default devise redirects to root_url. Since I'm using turbo I didn't notice this at first due to https://github.com/hotwired/turbo-rails/issues/122
class Users::RegistrationsController < Devise::RegistrationsController
...
# def after_inactive_sign_up_path_for(resource)
# super(resource)
# end
end
Environment
Current behavior
require 'test_helper'
Expected behavior
Although it works as expected when testing it manually, it fails when creating an integration test for the sign_up with activation account module:
Expected response to be a <3XX: redirect>, but was a <200: OK>