Browse Source

amend tests after rebasing

pull/1214/head
Arthur Campbell 3 years ago
parent
commit
f2f63451b9
  1. 5
      config/locales/en.yml
  2. 2
      db/schema.rb
  3. 2
      spec/models/sales_log_spec.rb

5
config/locales/en.yml

@ -451,12 +451,7 @@ en:
title: "You told us this person is %{age} or over and not retired" title: "You told us this person is %{age} or over and not retired"
hint_text: "The minimum expected retirement age for %{gender} in England is %{age}." hint_text: "The minimum expected retirement age for %{gender} in England is %{age}."
extra_borrowing: extra_borrowing:
<<<<<<< HEAD
title: "The mortgage and deposit are higher than the purchase minus the discount" title: "The mortgage and deposit are higher than the purchase minus the discount"
=======
title: "You told us this doesn't include any extra borrowing"
hint_text: "The mortgage and deposit are higher than the purchase minus the discount"
>>>>>>> 65ad4b0b (fix rebase conflicts)
pregnancy: pregnancy:
title: "You told us somebody in the household is pregnant" title: "You told us somebody in the household is pregnant"
no_females: "You also told us there are no female tenants living at the property." no_females: "You also told us there are no female tenants living at the property."

2
db/schema.rb

@ -487,9 +487,9 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_26_145529) do
t.integer "hoyear" t.integer "hoyear"
t.integer "fromprop" t.integer "fromprop"
t.integer "socprevten" t.integer "socprevten"
t.integer "mortlen"
t.integer "mortgagelender" t.integer "mortgagelender"
t.string "mortgagelenderother" t.string "mortgagelenderother"
t.integer "mortlen"
t.integer "extrabor" t.integer "extrabor"
t.integer "hhmemb" t.integer "hhmemb"
t.integer "totadult" t.integer "totadult"

2
spec/models/sales_log_spec.rb

@ -109,7 +109,7 @@ RSpec.describe SalesLog, type: :model do
let(:sales_log) { FactoryBot.create(:sales_log, :completed) } let(:sales_log) { FactoryBot.create(:sales_log, :completed) }
it "correctly derives and saves exday, exmonth and exyear" do it "correctly derives and saves exday, exmonth and exyear" do
sales_log.update!(exdate: Time.gm(2022, 5, 4), ownershipsch: 1, staircase: 2, resale: 2) sales_log.update!(exdate: Time.gm(2022, 5, 4), saledate: Time.gm(2022, 7, 4), ownershipsch: 1, staircase: 2, resale: 2)
record_from_db = ActiveRecord::Base.connection.execute("select exday, exmonth, exyear from sales_logs where id=#{sales_log.id}").to_a[0] record_from_db = ActiveRecord::Base.connection.execute("select exday, exmonth, exyear from sales_logs where id=#{sales_log.id}").to_a[0]
expect(record_from_db["exday"]).to eq(4) expect(record_from_db["exday"]).to eq(4)
expect(record_from_db["exmonth"]).to eq(5) expect(record_from_db["exmonth"]).to eq(5)

Loading…
Cancel
Save