Failing controller test for search result

This commit is contained in:
Lars Henrik Mai 2016-02-18 07:15:28 +01:00
parent 79e7ea61d3
commit 2d85da354b

View file

@ -19,6 +19,14 @@ RSpec.describe SearchController, type: :controller, elasticsearch: true do
expect(response).to render_template(:index)
end
it "executes the search with PaperSearch parameters" do
result_page = double("page", results: []) # MEH
response = double("es_response", page: result_page)
expect(Paper).to receive(:search).and_return(response)
get :index, body: 'leipzig'
end
end
end