2016-06-09 12:08:18 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Ban::SearchController, type: :controller do
|
|
|
|
describe '#GET' do
|
|
|
|
let (:request) { '' }
|
|
|
|
|
|
|
|
before do
|
|
|
|
stub_request(:get, "http://api-adresse.data.gouv.fr/search?limit=5&q=").
|
|
|
|
to_return(:status => 200, :body => 'Missing query', :headers => {})
|
2016-11-15 04:26:25 +01:00
|
|
|
|
|
|
|
get :get, params: {request: request}
|
2016-06-09 12:08:18 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
it { expect(response.status).to eq 200 }
|
|
|
|
end
|
|
|
|
end
|