ApiAdresse::AddressRetriever → ApiAdresse::AddressAdapter

This commit is contained in:
gregoirenovel 2018-10-15 17:43:08 +02:00
parent 4d963901a8
commit 517c0ad3fc
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -1,4 +1,4 @@
class ApiAdresse::AddressRetriever
class ApiAdresse::AddressAdapter
def initialize(address)
@address = address
end

View file

@ -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') }