diff options
| author | Yuhiba | 2018-04-25 16:06:51 +0200 |
|---|---|---|
| committer | Johan Van Ryseghem | 2018-04-26 15:35:54 +0200 |
| commit | cf67147bfc2749cef0af610e3194dad7c78a6321 (patch) | |
| tree | 96b3436db95aa3e434d1d74b6aecde4f07a5dff9 /spec | |
| parent | 86eb5008e14dfc2d4471aaf409de813f5840e7ac (diff) | |
| download | chouette-core-cf67147bfc2749cef0af610e3194dad7c78a6321.tar.bz2 | |
StopAreasController spec: Test when the name filter is empty
Check that all stop areas are found when the name/objectid/registration
number filter is sent with an empty value.
Refs #6681
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/controllers/stop_areas_controller_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/stop_areas_controller_spec.rb b/spec/controllers/stop_areas_controller_spec.rb index a67b0e2e6..fbad2649c 100644 --- a/spec/controllers/stop_areas_controller_spec.rb +++ b/spec/controllers/stop_areas_controller_spec.rb @@ -27,6 +27,16 @@ RSpec.describe StopAreasController, :type => :controller do expect(assigns(:stop_areas)).to eq([matched]) end + + it "doesn't filter when the name filter is empty" do + get :index, + stop_area_referential_id: stop_area_referential.id, + q: { + name_or_objectid_or_registration_number_cont: '' + } + + expect(assigns(:stop_areas)).to eq([stop_area]) + end end describe 'PUT deactivate' do |
