@ -57,14 +57,14 @@ RSpec.describe Form::Lettings::Questions::UprnSelection, type: :model do
end
it"has the correct answer options"do
stub_request(:get,/api.os.uk/)
stub_request(:get,/api\.os\.uk/)
.to_return(status:200,body:"",headers:{})
expect(question.answer_options(log)).toeq({"uprn_not_listed"=>{"value"=>"The address is not listed, I want to enter the address manually"},"UPRN"=>{"value"=>"full address"},"divider"=>{"value"=>true}})
end
it"has the correct displayed answer options"do
stub_request(:get,/api.os.uk/)
stub_request(:get,/api\.os\.uk/)
.to_return(status:200,body:"",headers:{})
expect(question.displayed_answer_options(log)).toeq({"uprn_not_listed"=>{"value"=>"The address is not listed, I want to enter the address manually"},"UPRN"=>{"value"=>"full address"},"divider"=>{"value"=>true}})
@ -80,7 +80,7 @@ RSpec.describe Form::Lettings::Questions::UprnSelection, type: :model do
@ -57,14 +57,14 @@ RSpec.describe Form::Sales::Questions::UprnSelection, type: :model do
end
it"has the correct answer options"do
stub_request(:get,/api.os.uk/)
stub_request(:get,/api\.os\.uk/)
.to_return(status:200,body:"",headers:{})
expect(question.answer_options(log)).toeq({"uprn_not_listed"=>{"value"=>"The address is not listed, I want to enter the address manually"},"UPRN"=>{"value"=>"full address"},"divider"=>{"value"=>true}})
end
it"has the correct displayed answer options"do
stub_request(:get,/api.os.uk/)
stub_request(:get,/api\.os\.uk/)
.to_return(status:200,body:"",headers:{})
expect(question.displayed_answer_options(log)).toeq({"uprn_not_listed"=>{"value"=>"The address is not listed, I want to enter the address manually"},"UPRN"=>{"value"=>"full address"},"divider"=>{"value"=>true}})
@ -80,7 +80,7 @@ RSpec.describe Form::Sales::Questions::UprnSelection, type: :model do
.to_return(status:200,body:{results:[{DPA:{MATCH:0.9,BUILDING_NAME:"result address line 1",POST_TOWN:"result town or city",POSTCODE:"AA1 1AA",UPRN:"12345"}}]}.to_json,headers:{})
.to_return(status:200,body:{results:[{DPA:{MATCH:0.9,BUILDING_NAME:"result address line 1",POST_TOWN:"result town or city",POSTCODE:"AA1 1AA",UPRN:"12345"}}]}.to_json,headers:{})