From 117dc8bfa263ed25811c72f5be3aa2251cf7b367 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Wed, 16 Nov 2022 09:19:00 +0000 Subject: [PATCH] refactor: typo and remove unnecessary line for this PR --- app/models/lettings_log.rb | 1 - spec/requests/organisations_controller_spec.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/lettings_log.rb b/app/models/lettings_log.rb index 76b43e511..f09fd1ebd 100644 --- a/app/models/lettings_log.rb +++ b/app/models/lettings_log.rb @@ -38,7 +38,6 @@ class LettingsLog < Log scope :filter_by_propcode, ->(propcode) { where("propcode ILIKE ?", "%#{propcode}%") } scope :filter_by_postcode, ->(postcode_full) { where("REPLACE(postcode_full, ' ', '') ILIKE ?", "%#{postcode_full.delete(' ')}%") } scope :filter_by_location_postcode, ->(postcode_full) { left_joins(:location).where("REPLACE(locations.postcode, ' ', '') ILIKE ?", "%#{postcode_full.delete(' ')}%") } - scope :filter_by_before_startdate, ->(date) { left_joins(:location).where("lettings_logs.startdate >= ?", date) } scope :search_by, lambda { |param| filter_by_location_postcode(param) .or(filter_by_tenant_code(param)) diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index d3d22513a..9b0e934f6 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -59,7 +59,7 @@ RSpec.describe OrganisationsController, type: :request do expect(page).to have_field("search", type: "search") end - it "has hidden accebility field with description" do + it "has hidden accessibility field with description" do expected_field = "

Supported housing schemes

" expect(CGI.unescape_html(response.body)).to include(expected_field) end