From defbcddcf9d07ec0edaffc8c696be7bc0fa73334 Mon Sep 17 00:00:00 2001 From: MadeTech Dushan Date: Mon, 29 Nov 2021 12:12:44 +0000 Subject: [PATCH] =?UTF-8?q?lint=20fixes=20=F0=9F=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/models/case_log_spec.rb | 12 ++++++------ spec/requests/case_log_controller_spec.rb | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/models/case_log_spec.rb b/spec/models/case_log_spec.rb index 46508fee6..b52d04a63 100644 --- a/spec/models/case_log_spec.rb +++ b/spec/models/case_log_spec.rb @@ -247,14 +247,14 @@ RSpec.describe Form, type: :model do expect { CaseLog.create!(tenancy: "Assured Shorthold", - tenancylength: 2) + tenancylength: 2) }.not_to raise_error end it "Must be empty or between 2 and 99 if type of tenancy is Secure" do expect { CaseLog.create!(tenancy: "Secure (including flexible)", - tenancylength: 1) + tenancylength: 1) }.to raise_error(ActiveRecord::RecordInvalid) expect { @@ -264,12 +264,12 @@ RSpec.describe Form, type: :model do expect { CaseLog.create!(tenancy: "Secure (including flexible)", - tenancylength: nil) + tenancylength: nil) }.not_to raise_error expect { CaseLog.create!(tenancy: "Secure (including flexible)", - tenancylength: 2) + tenancylength: 2) }.not_to raise_error end end @@ -337,7 +337,7 @@ RSpec.describe Form, type: :model do it "must be provided if tenancy type was given as other" do expect { CaseLog.create!(tenancy: "Other", - tenancyother: nil) + tenancyother: nil) }.to raise_error(ActiveRecord::RecordInvalid) expect { @@ -349,7 +349,7 @@ RSpec.describe Form, type: :model do it "must not be provided if tenancy type is not other" do expect { CaseLog.create!(tenancy: "Secure (including flexible)", - tenancyother: "the other reason provided") + tenancyother: "the other reason provided") }.to raise_error(ActiveRecord::RecordInvalid) expect { diff --git a/spec/requests/case_log_controller_spec.rb b/spec/requests/case_log_controller_spec.rb index c8021bc17..443e22b75 100644 --- a/spec/requests/case_log_controller_spec.rb +++ b/spec/requests/case_log_controller_spec.rb @@ -319,7 +319,7 @@ RSpec.describe CaseLogsController, type: :request do case_log: { page: page_id, age1: answer, - age2: 2000 + age2: 2000, }, } end