aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcedricnjanga2018-03-08 20:43:07 -0800
committerAlban Peignier2018-03-15 10:01:30 +0100
commit0a81b6a94eeabe481e0ef7473a13b1847539adb5 (patch)
treea17855af6ce7e5f96613df2d0e24777205789994
parent2104fa747e813e7a829de0d081d0fdca138e796f (diff)
downloadchouette-core-0a81b6a94eeabe481e0ef7473a13b1847539adb5.tar.bz2
Refs #6033 add specs
-rw-r--r--spec/features/stop_areas_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/features/stop_areas_spec.rb b/spec/features/stop_areas_spec.rb
index 668eb2fa3..0e1f6f3a9 100644
--- a/spec/features/stop_areas_spec.rb
+++ b/spec/features/stop_areas_spec.rb
@@ -30,6 +30,34 @@ describe "StopAreas", :type => :feature do
expect(page).to have_content(stop_areas.first.name)
expect(page).not_to have_content(stop_areas.last.name)
end
+
+ context 'filtering by status' do
+ before do
+ stop_areas.first.activate!
+ stop_areas.last.deactivate!
+ end
+
+ xit 'should filter stop areas in creation' do
+ find("#q_status_in_creation").set(true)
+ click_button 'search-btn'
+ expect(page).not_to have_content(stop_areas.first.name)
+ expect(page).not_to have_content(stop_areas.last.name)
+ end
+
+ xit 'should filter confirmed stop areas' do
+ find("#q_status_confirmed").set(true)
+ click_button 'search-btn'
+ expect(page).to have_content(stop_areas.first.name)
+ expect(page).not_to have_content(stop_areas.last.name)
+ end
+
+ xit 'should filter deactivated stop areas' do
+ find("#q_status_deactivated").set(true)
+ click_button 'search-btn'
+ expect(page).not_to have_content(stop_areas.first.name)
+ expect(page).to have_content(stop_areas.last.name)
+ end
+ end
end
end