Browse Source

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
pull/713/head
Dushan Despotovic 3 years ago committed by Kat
parent
commit
fb564ec61f
  1. 2
      spec/models/case_log_spec.rb

2
spec/models/case_log_spec.rb

@ -1761,7 +1761,7 @@ RSpec.describe CaseLog do
it "correcly infers and saves the renewal date" 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] 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 end
end end

Loading…
Cancel
Save