Skip to content

Commit

Permalink
Further spec fixes to use newer EaAddressFacadeV11
Browse files Browse the repository at this point in the history
  • Loading branch information
jjromeo committed Apr 25, 2023
1 parent 3660710 commit cdbb7db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module WasteCarriersEngine
before do
response = double(:response, successful?: false, error: "foo")

allow(DefraRuby::Address::OsPlacesAddressLookupService).to receive(:run).and_return(response)
allow(DefraRuby::Address::EaAddressFacadeV11Service).to receive(:run).and_return(response)
end

it "redirects to the contact_address_manual form" do
Expand Down
6 changes: 3 additions & 3 deletions spec/support/shared_examples/validate_postcode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
example_json = { postcode: "BS1 5AH" }
response = double(:response, results: [example_json], successful?: true)

allow(DefraRuby::Address::OsPlacesAddressLookupService).to receive(:run).and_return(response)
allow(DefraRuby::Address::EaAddressFacadeV11Service).to receive(:run).and_return(response)
end

it "is valid" do
Expand Down Expand Up @@ -54,7 +54,7 @@
before do
response = double(:response, successful?: false, error: DefraRuby::Address::NoMatchError.new)

allow(DefraRuby::Address::OsPlacesAddressLookupService).to receive(:run).and_return(response)
allow(DefraRuby::Address::EaAddressFacadeV11Service).to receive(:run).and_return(response)
end

it "is not valid" do
Expand All @@ -66,7 +66,7 @@
before do
response = double(:response, successful?: false, error: "foo")

allow(DefraRuby::Address::OsPlacesAddressLookupService).to receive(:run).and_return(response)
allow(DefraRuby::Address::EaAddressFacadeV11Service).to receive(:run).and_return(response)
end

it "is valid" do
Expand Down

0 comments on commit cdbb7db

Please sign in to comment.