Browse Source

refactor: linting

pull/1378/head
natdeanlewissoftwire 3 years ago
parent
commit
c402c5bd16
  1. 3
      spec/models/lettings_log_spec.rb

3
spec/models/lettings_log_spec.rb

@ -1992,6 +1992,7 @@ RSpec.describe LettingsLog do
context "and a scheme with a single log is selected" do context "and a scheme with a single log is selected" do
before do before do
Timecop.freeze(2022, 4, 2) Timecop.freeze(2022, 4, 2)
lettings_log.update!(startdate: Time.zone.local(2022, 4, 2), scheme:)
end end
after do after do
@ -2001,8 +2002,6 @@ RSpec.describe LettingsLog do
let(:scheme) { FactoryBot.create(:scheme) } let(:scheme) { FactoryBot.create(:scheme) }
let!(:location) { FactoryBot.create(:location, scheme:) } let!(:location) { FactoryBot.create(:location, scheme:) }
before { lettings_log.update!(startdate: Time.zone.local(2022, 4, 2), scheme:) }
it "derives the scheme location" do it "derives the scheme location" do
record_from_db = ActiveRecord::Base.connection.execute("select location_id from lettings_logs where id=#{lettings_log.id}").to_a[0] record_from_db = ActiveRecord::Base.connection.execute("select location_id from lettings_logs where id=#{lettings_log.id}").to_a[0]
expect(record_from_db["location_id"]).to eq(location.id) expect(record_from_db["location_id"]).to eq(location.id)

Loading…
Cancel
Save