AddressController#get → #suggestions
This commit is contained in:
parent
6658b466cb
commit
99894961a5
3 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
class AddressController < ApplicationController
|
||||
def get
|
||||
def suggestions
|
||||
request = params[:request]
|
||||
|
||||
json = ApiAdresse::AddressAdapter.new(request).get_suggestions.map do |value|
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue