no crash when q is missing on RechercheController::index
This commit is contained in:
parent
64009a5e10
commit
f06ae1631f
2 changed files with 13 additions and 1 deletions
|
@ -48,5 +48,16 @@ describe Gestionnaires::RechercheController, type: :controller do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with no query param it does not crash' do
|
||||
subject { get :index, params: {} }
|
||||
|
||||
it { is_expected.to have_http_status(200) }
|
||||
|
||||
it 'returns 0 dossier' do
|
||||
subject
|
||||
expect(assigns(:dossiers).count).to eq(0)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue