Skip to content

Commit

Permalink
Update url for address lookup (#195)
Browse files Browse the repository at this point in the history
https://eaflood.atlassian.net/browse/WC-366

WC-366 is a story about adding the ability to 'mock' interactions with Worldpay in preparation for performance testing. As part of that story some general refactoring of the OS Places address lookup project were undertaken, including removing the need to specify .json in the url.

This change updates the renewals service accordingly.
  • Loading branch information
Cruikshanks committed Jun 22, 2018
1 parent d696dd4 commit 6833064
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/services/address_finder_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class AddressFinderService
def initialize(postcode)
# Strip out non-alphanumeric characters
@postcode = postcode.gsub(/[^a-z0-9]/i, "")
@url = Rails.configuration.os_places_service_url + "/addresses.json?postcode=" + @postcode
@url = Rails.configuration.os_places_service_url + "/addresses?postcode=" + @postcode
end

def search_by_postcode
Expand Down
2 changes: 1 addition & 1 deletion spec/cassettes/postcode_no_matches.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/cassettes/postcode_valid.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6833064

Please sign in to comment.