diff options
| author | Zog | 2018-01-24 07:28:57 +0100 |
|---|---|---|
| committer | Zog | 2018-01-31 15:12:03 +0100 |
| commit | eaf51fdc334923edd3dbd399d2217ff0bbe0699a (patch) | |
| tree | 455b73c3549daddb70171704b356068b4f0e12aa /spec/models/calendar_spec.rb | |
| parent | 90f54f0acfe65ff276a229239809ce0e9fddf0b0 (diff) | |
| download | chouette-core-eaf51fdc334923edd3dbd399d2217ff0bbe0699a.tar.bz2 | |
Refs #5682; Add application_days field to calendars
Diffstat (limited to 'spec/models/calendar_spec.rb')
| -rw-r--r-- | spec/models/calendar_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/models/calendar_spec.rb b/spec/models/calendar_spec.rb index e71c2b081..4c65b9660 100644 --- a/spec/models/calendar_spec.rb +++ b/spec/models/calendar_spec.rb @@ -9,11 +9,12 @@ RSpec.describe Calendar, :type => :model do it { is_expected.to be_versioned } describe '#to_time_table' do - let(:calendar) { create(:calendar, date_ranges: [Date.today...(Date.today + 1.month)]) } + let(:calendar) { create(:calendar, int_day_types: Calendar::MONDAY | Calendar::SUNDAY, date_ranges: [Date.today...(Date.today + 1.month)]) } it 'should convert calendar to an instance of Chouette::TimeTable' do time_table = calendar.convert_to_time_table expect(time_table).to be_an_instance_of(Chouette::TimeTable) + expect(time_table.int_day_types).to eq calendar.int_day_types expect(time_table.periods[0].period_start).to eq(calendar.periods[0].begin) expect(time_table.periods[0].period_end).to eq(calendar.periods[0].end) expect(time_table.dates.map(&:date)).to match_array(calendar.dates) |
