module GdsApi::TestHelpers::Mapit

def stub_mapit_does_not_have_a_postcode(postcode)

def stub_mapit_does_not_have_a_postcode(postcode)
  stub_request(:get, "#{MAPIT_ENDPOINT}/postcode/" + postcode.tr(" ", "+") + ".json")
    .to_return(body: { "code" => 404, "error" => "No Postcode matches the given query." }.to_json, status: 404)
end