mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 23:53:15 +01:00
Failing controller test for search result
This commit is contained in:
parent
79e7ea61d3
commit
2d85da354b
1 changed files with 8 additions and 0 deletions
|
@ -19,6 +19,14 @@ RSpec.describe SearchController, type: :controller, elasticsearch: true do
|
||||||
expect(response).to render_template(:index)
|
expect(response).to render_template(:index)
|
||||||
end
|
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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue