diff options
| author | Vlatka Pavisic | 2017-01-04 12:10:44 +0100 |
|---|---|---|
| committer | Vlatka Pavisic | 2017-01-04 12:10:44 +0100 |
| commit | d1e76469119acd0d92cdb65fa8e9a5b61803b3a3 (patch) | |
| tree | d448971fb7e27721b83c806780fc7e656b9a4acb /spec/features | |
| parent | d368e6304ba890f737fb01b2e5f235ba145b346b (diff) | |
| download | chouette-core-d1e76469119acd0d92cdb65fa8e9a5b61803b3a3.tar.bz2 | |
Refs #2263 : CalendarPolicy, translations...
Diffstat (limited to 'spec/features')
| -rw-r--r-- | spec/features/calendars_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/features/calendars_spec.rb b/spec/features/calendars_spec.rb index 9331427ef..c1701d7c7 100644 --- a/spec/features/calendars_spec.rb +++ b/spec/features/calendars_spec.rb @@ -5,13 +5,16 @@ describe 'Calendars', type: :feature do login_user let!(:calendars) { Array.new(2) { create :calendar, organisation_id: 1 } } + let!(:shared_calendar_other_org) { create :calendar, shared: true } + let!(:unshared_calendar_other_org) { create :calendar } describe 'index' do before(:each) { visit calendars_path } - it 'displays calendars' do + it 'displays calendars of the current organisation and shared calendars' do expect(page).to have_content(calendars.first.short_name) - expect(page).to have_content(calendars.last.short_name) + expect(page).to have_content(shared_calendar_other_org.short_name) + expect(page).not_to have_content(unshared_calendar_other_org.short_name) end context 'filtering' do |
