Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt specs to changed end_time
Browse files Browse the repository at this point in the history
end_time is now end_date start of day, so excluding any meetings on that
day
oliverguenther committed Dec 6, 2024
1 parent 15f0487 commit a136a42
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/meeting/spec/models/recurring_meeting_spec.rb
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@

it "schedules daily", :aggregate_failures do
expect(subject.first_occurrence).to eq Time.zone.tomorrow + 10.hours
expect(subject.last_occurrence).to eq Time.zone.tomorrow + 1.week + 10.hours
expect(subject.last_occurrence).to eq Time.zone.tomorrow + 6.days + 10.hours

occurrence_in_two_days = Time.zone.today + 2.days + 10.hours
Timecop.freeze(Time.zone.tomorrow + 11.hours) do
@@ -106,7 +106,7 @@

it "schedules weekly", :aggregate_failures do
expect(subject.first_occurrence).to eq Time.zone.tomorrow + 10.hours
expect(subject.last_occurrence).to eq Time.zone.tomorrow + 4.weeks + 10.hours
expect(subject.last_occurrence).to eq Time.zone.tomorrow + 3.weeks + 10.hours

following_occurrence = Time.zone.tomorrow + 7.days + 10.hours
Timecop.freeze(Time.zone.tomorrow + 11.hours) do
@@ -118,8 +118,7 @@
Time.zone.tomorrow + 10.hours,
Time.zone.tomorrow + 7.days + 10.hours,
Time.zone.tomorrow + 14.days + 10.hours,
Time.zone.tomorrow + 21.days + 10.hours,
Time.zone.tomorrow + 28.days + 10.hours
Time.zone.tomorrow + 21.days + 10.hours
]

Timecop.freeze(Time.zone.tomorrow + 5.weeks) do

0 comments on commit a136a42

Please sign in to comment.