mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 15:43:14 +01:00
Add more search controller specs
This commit is contained in:
parent
8890354909
commit
85167bc563
1 changed files with 12 additions and 0 deletions
|
@ -7,6 +7,18 @@ RSpec.describe SearchController, type: :controller, elasticsearch: true do
|
||||||
get :index, body: 'leipzig'
|
get :index, body: 'leipzig'
|
||||||
expect(response).to have_http_status(:success)
|
expect(response).to have_http_status(:success)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "assigns @search_definition with default sort order" do
|
||||||
|
search = PaperSearch.new(sort_by: 'score')
|
||||||
|
get :index, body: 'leipzig'
|
||||||
|
expect(assigns(:search_definition).attributes).to eq(search.attributes)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "renders the index template" do
|
||||||
|
get :index, body: 'leipzig'
|
||||||
|
expect(response).to render_template(:index)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue