From 1906359dca75b1805c852036ac988f0bad72a40a Mon Sep 17 00:00:00 2001 From: Sam Seed Date: Thu, 30 Mar 2023 18:16:50 +0100 Subject: [PATCH] refactor: write 'duplicate' instead of 'duplicity' --- app/services/bulk_upload/lettings/year2022/row_parser.rb | 4 ++-- app/services/bulk_upload/lettings/year2023/row_parser.rb | 4 ++-- .../services/bulk_upload/lettings/year2022/row_parser_spec.rb | 2 +- .../services/bulk_upload/lettings/year2023/row_parser_spec.rb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/services/bulk_upload/lettings/year2022/row_parser.rb b/app/services/bulk_upload/lettings/year2022/row_parser.rb index 51ce1d32b..743b40af8 100644 --- a/app/services/bulk_upload/lettings/year2022/row_parser.rb +++ b/app/services/bulk_upload/lettings/year2022/row_parser.rb @@ -394,7 +394,7 @@ class BulkUpload::Lettings::Year2022::RowParser end def log_already_exists? - LettingsLog.exists?(duplicity_check_fields.index_with { |field| log.public_send(field) }) + LettingsLog.exists?(duplicate_check_fields.index_with { |field| log.public_send(field) }) end private @@ -441,7 +441,7 @@ private @created_by ||= User.find_by(email: field_112) end - def duplicity_check_fields + def duplicate_check_fields %w[ startdate age1 diff --git a/app/services/bulk_upload/lettings/year2023/row_parser.rb b/app/services/bulk_upload/lettings/year2023/row_parser.rb index 12a2b3de9..61fc124f1 100644 --- a/app/services/bulk_upload/lettings/year2023/row_parser.rb +++ b/app/services/bulk_upload/lettings/year2023/row_parser.rb @@ -399,7 +399,7 @@ class BulkUpload::Lettings::Year2023::RowParser end def log_already_exists? - LettingsLog.exists?(duplicity_check_fields.index_with { |field| log.public_send(field) }) + LettingsLog.exists?(duplicate_check_fields.index_with { |field| log.public_send(field) }) end private @@ -452,7 +452,7 @@ private end end - def duplicity_check_fields + def duplicate_check_fields %w[ startdate age1 diff --git a/spec/services/bulk_upload/lettings/year2022/row_parser_spec.rb b/spec/services/bulk_upload/lettings/year2022/row_parser_spec.rb index 44fa962b9..1645f67ff 100644 --- a/spec/services/bulk_upload/lettings/year2022/row_parser_spec.rb +++ b/spec/services/bulk_upload/lettings/year2022/row_parser_spec.rb @@ -226,7 +226,7 @@ RSpec.describe BulkUpload::Lettings::Year2022::RowParser do expect(parser).not_to be_valid end - it "adds an error to all (and only) the fields used to determine duplicity" do + it "adds an error to all (and only) the fields used to determine duplicates" do parser.valid? error_message = "This is a duplicate log" diff --git a/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb b/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb index 9414939f4..d46bc8274 100644 --- a/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb +++ b/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb @@ -246,7 +246,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do expect(parser).not_to be_valid end - it "adds an error to all (and only) the fields used to determine duplicity" do + it "adds an error to all (and only) the fields used to determine duplicates" do parser.valid? error_message = "This is a duplicate log"