AddressController#get → #suggestions

This commit is contained in:
gregoirenovel 2018-10-15 23:40:39 +02:00
parent 6658b466cb
commit 99894961a5
3 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
class AddressController < ApplicationController
def get
def suggestions
request = params[:request]
json = ApiAdresse::AddressAdapter.new(request).get_suggestions.map do |value|

View file

@ -250,7 +250,7 @@ Rails.application.routes.draw do
# Addresses
#
get 'address/suggestions' => 'address#get'
get 'address/suggestions' => 'address#suggestions'
get 'address/geocode' => 'address#geocode'
namespace :invites do

View file

@ -1,8 +1,8 @@
require 'spec_helper'
describe AddressController, type: :controller do
describe '#GET get' do
subject { get :get, params: { request: request } }
describe '#GET suggestions' do
subject { get :suggestions, params: { request: request } }
before do
subject