From ffd883e84d5257bcd3fa100558ab411ced85af4a Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Sat, 30 Mar 2019 23:03:47 +0000 Subject: [PATCH] Remove dead code from usersregistration (signup calls are always ajax) and remove application.html.erb (spree frontend default layout) because this usersregistration was the last bit of OFN code to use it --- app/controllers/user_registrations_controller.rb | 3 --- app/views/layouts/application.html.erb | 1 - spec/controllers/user_registrations_controller_spec.rb | 8 -------- 3 files changed, 12 deletions(-) delete mode 100644 app/views/layouts/application.html.erb diff --git a/app/controllers/user_registrations_controller.rb b/app/controllers/user_registrations_controller.rb index e8e75dc5ee..2a3b3aaaa8 100644 --- a/app/controllers/user_registrations_controller.rb +++ b/app/controllers/user_registrations_controller.rb @@ -39,9 +39,6 @@ class UserRegistrationsController < Spree::UserRegistrationsController def render_error(errors = {}) clean_up_passwords(resource) respond_to do |format| - format.html do - render :new - end format.js do render json: errors, status: :unauthorized end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb deleted file mode 100644 index 4b8bfa1b1e..0000000000 --- a/app/views/layouts/application.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :file => 'spree/layouts/spree_application' %> diff --git a/spec/controllers/user_registrations_controller_spec.rb b/spec/controllers/user_registrations_controller_spec.rb index 22d14b383f..bb725945d2 100644 --- a/spec/controllers/user_registrations_controller_spec.rb +++ b/spec/controllers/user_registrations_controller_spec.rb @@ -60,14 +60,6 @@ describe UserRegistrationsController, type: :controller do end end - context "when registration fails" do - it "renders new" do - spree_post :create, spree_user: {} - expect(response.status).to eq(200) - expect(response).to render_template "spree/user_registrations/new" - end - end - context "when registration succeeds" do context "when referer is not '/checkout'" do it "redirects to root" do