AddressController#get_address_point → #geocode

This commit is contained in:
gregoirenovel 2018-10-15 23:38:51 +02:00
parent f01057267b
commit 43f9fc93de
3 changed files with 4 additions and 4 deletions

View file

@ -9,7 +9,7 @@ class AddressController < ApplicationController
render json: json
end
def get_address_point
def geocode
request = params[:request]
point = ApiAdresse::PointAdapter.new(request).geocode

View file

@ -251,7 +251,7 @@ Rails.application.routes.draw do
#
get 'address/search' => 'address#get'
get 'address/geocode' => 'address#get_address_point'
get 'address/geocode' => 'address#geocode'
namespace :invites do
post 'dossier/:dossier_id' => '/invites#create', as: 'dossier'

View file

@ -23,9 +23,9 @@ describe AddressController, type: :controller do
end
end
describe '#GET get_address_point' do
describe '#GET geocode' do
let(:dossier_id) { "1" }
subject { get :get_address_point, params: { request: request, dossier_id: dossier_id } }
subject { get :geocode, params: { request: request, dossier_id: dossier_id } }
before do
subject