diff --git a/app/controllers/case_logs_controller.rb b/app/controllers/case_logs_controller.rb index 26d84dd28..6bc6c0fb4 100644 --- a/app/controllers/case_logs_controller.rb +++ b/app/controllers/case_logs_controller.rb @@ -1,7 +1,6 @@ class CaseLogsController < ApplicationController skip_before_action :verify_authenticity_token, if: :json_api_request? before_action :authenticate, if: :json_api_request? - # TODO: determine if it's worth splitting out an API controller before_action :authenticate_user!, unless: :json_api_request? def index diff --git a/lib/tasks/form_definition.rake b/lib/tasks/form_definition.rake index cbbf924bc..9a94682aa 100644 --- a/lib/tasks/form_definition.rake +++ b/lib/tasks/form_definition.rake @@ -1,6 +1,5 @@ require "json" require "json-schema" -# rubocop:disable Lint/ShadowingOuterLocalVariable def get_all_form_paths(directories) form_paths = [] directories.each do |directory| diff --git a/spec/requests/users/passwords_controller_spec.rb b/spec/requests/users/passwords_controller_spec.rb index b0a3f5783..c8c55426d 100644 --- a/spec/requests/users/passwords_controller_spec.rb +++ b/spec/requests/users/passwords_controller_spec.rb @@ -2,32 +2,32 @@ require "rails_helper" require_relative "../../support/devise" RSpec.describe Users::PasswordsController, type: :request do - let(:params) { { user: { email: email } } } + let(:params) { { user: { email: email } } } - context "when a password reset is requested for a valid email" do - let(:user) { FactoryBot.create(:user) } - let(:email) { user.email } + context "when a password reset is requested for a valid email" do + let(:user) { FactoryBot.create(:user) } + let(:email) { user.email } - it "redirects to the email sent page anyway" do - post "/users/password", params: params - expect(response).to have_http_status(:redirect) - follow_redirect! - expect(response.body).to match(/Check your email/) - end + it "redirects to the email sent page anyway" do + post "/users/password", params: params + expect(response).to have_http_status(:redirect) + follow_redirect! + expect(response.body).to match(/Check your email/) end + end - context "when a password reset is requested with an email that doesn't exist in the system" do - before do - allow_any_instance_of(Users::PasswordsController).to receive(:is_navigational_format?).and_return(false) - end + context "when a password reset is requested with an email that doesn't exist in the system" do + before do + allow_any_instance_of(Users::PasswordsController).to receive(:is_navigational_format?).and_return(false) + end - let(:email) { "madeup_email@test.com" } + let(:email) { "madeup_email@test.com" } - it "redirects to the email sent page anyway" do - post "/users/password", params: params - expect(response).to have_http_status(:redirect) - follow_redirect! - expect(response.body).to match(/Check your email/) - end + it "redirects to the email sent page anyway" do + post "/users/password", params: params + expect(response).to have_http_status(:redirect) + follow_redirect! + expect(response.body).to match(/Check your email/) end + end end