|
|
@ -27,7 +27,7 @@ RSpec.describe Imports::LettingsLogsFieldImportService do |
|
|
|
FactoryBot.create(:user, old_user_id:, organisation:) |
|
|
|
FactoryBot.create(:user, old_user_id:, organisation:) |
|
|
|
|
|
|
|
|
|
|
|
# Stub the form handler to use the real form |
|
|
|
# Stub the form handler to use the real form |
|
|
|
allow(FormHandler.instance).to receive(:get_form).with("2021_2022").and_return(real_2021_2022_form) |
|
|
|
allow(FormHandler.instance).to receive(:get_form).with("previous_lettings").and_return(real_2021_2022_form) |
|
|
|
|
|
|
|
|
|
|
|
WebMock.stub_request(:get, /api.postcodes.io\/postcodes\/LS166FT/) |
|
|
|
WebMock.stub_request(:get, /api.postcodes.io\/postcodes\/LS166FT/) |
|
|
|
.to_return(status: 200, body: '{"status":200,"result":{"codes":{"admin_district":"E08000035"}}}', headers: {}) |
|
|
|
.to_return(status: 200, body: '{"status":200,"result":{"codes":{"admin_district":"E08000035"}}}', headers: {}) |
|
|
|