diff --git a/app/controllers/passwords_controller.rb b/app/controllers/passwords_controller.rb index 9772e320a5c..9fa25fe71a8 100644 --- a/app/controllers/passwords_controller.rb +++ b/app/controllers/passwords_controller.rb @@ -4,6 +4,10 @@ def new render html: "", layout: "application" end + def edit + render html: "", layout: "application" + end + def create self.resource = resource_class.find_or_initialize_with_errors(resource_class.reset_password_keys, resource_params, :not_found) diff --git a/test/controllers/passwords_controller_test.rb b/test/controllers/passwords_controller_test.rb new file mode 100644 index 00000000000..669628ba597 --- /dev/null +++ b/test/controllers/passwords_controller_test.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +require "test_helper" + +class PasswordsControllerTest < ActionDispatch::IntegrationTest + it "serves the app shell for the forgot password page" do + create(:root_site) + + get new_user_password_path + + assert_response :success + assert_select "form", false + end + + it "serves the app shell for the reset password page instead of Devise's default form" do + create(:root_site) + + get edit_user_password_path(reset_password_token: "sometoken") + + assert_response :success + assert_select "form", false + end +end