aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXinhui2017-06-02 14:33:42 +0200
committerXinhui2017-06-02 14:33:42 +0200
commit4dd8b8382d4348d11a31d715362295f0c9cab2fc (patch)
tree2ebe41ceba15956a1e8f2ad5681e87ebd28058c1
parent2c1dd12c196ba3850308701413cb555949a2aaaf (diff)
downloadchouette-core-4dd8b8382d4348d11a31d715362295f0c9cab2fc.tar.bz2
Fix spec calendar filtering by name
-rw-r--r--spec/features/calendars_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/features/calendars_spec.rb b/spec/features/calendars_spec.rb
index 2089939bb..e15624295 100644
--- a/spec/features/calendars_spec.rb
+++ b/spec/features/calendars_spec.rb
@@ -19,12 +19,20 @@ describe 'Calendars', type: :feature do
context 'filtering' do
it 'supports filtering by short name' do
- fill_in 'q[short_name_cont]', with: calendars.first.short_name
+ fill_in 'q[name_or_short_name_cont]', with: calendars.first.short_name
click_button 'search_btn'
expect(page).to have_content(calendars.first.short_name)
expect(page).not_to have_content(calendars.last.short_name)
end
+ it 'supports filtering by name' do
+ fill_in 'q[name_or_short_name_cont]', with: calendars.first.name
+ click_button 'search_btn'
+ expect(page).to have_content(calendars.first.name)
+ expect(page).not_to have_content(calendars.last.name)
+ end
+
+
it 'supports filtering by shared' do
shared_calendar = create :calendar, organisation_id: 1, shared: true
visit calendars_path