From fb564ec61f0415d2e3661cc1ecdddf3113bebee3 Mon Sep 17 00:00:00 2001 From: Dushan Despotovic Date: Fri, 8 Jul 2022 12:29:27 +0100 Subject: [PATCH] Fix test failing in CI This test was failing due to some different between UTC and BST time as the record from the DB comes back with a UTC timezone. Comparing the integer values of both will ensure that both timestamps are identical and should fix the issue in the CI where it thinks the values are different --- spec/models/case_log_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/case_log_spec.rb b/spec/models/case_log_spec.rb index e2b92c24e..ae5c550d6 100644 --- a/spec/models/case_log_spec.rb +++ b/spec/models/case_log_spec.rb @@ -1761,7 +1761,7 @@ RSpec.describe CaseLog do it "correcly infers and saves the renewal date" do record_from_db = ActiveRecord::Base.connection.execute("SELECT voiddate from case_logs where id=#{supported_housing_case_log.id}").to_a[0] - expect(record_from_db["voiddate"]).to eq(supported_housing_case_log.startdate) + expect(record_from_db["voiddate"].to_i).to eq(supported_housing_case_log.startdate.to_i) end end end