ApiAdresse::AddressRetriever → ApiAdresse::AddressAdapter
This commit is contained in:
parent
4d963901a8
commit
517c0ad3fc
3 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@ class Ban::SearchController < ApplicationController
|
|||
def get
|
||||
request = params[:request]
|
||||
|
||||
json = ApiAdresse::AddressRetriever.new(request).list.map do |value|
|
||||
json = ApiAdresse::AddressAdapter.new(request).list.map do |value|
|
||||
{ label: value }
|
||||
end.to_json
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class ApiAdresse::AddressRetriever
|
||||
class ApiAdresse::AddressAdapter
|
||||
def initialize(address)
|
||||
@address = address
|
||||
end
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe ApiAdresse::AddressRetriever do
|
||||
describe ApiAdresse::AddressAdapter do
|
||||
describe '#list' do
|
||||
let(:request) { 'Paris' }
|
||||
let(:response) { File.open('spec/support/files/api_adresse/search_results.json') }
|
Loading…
Reference in a new issue