1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-03-15 12:29:16 +01:00

(bug) user cannot see past availabilities

This commit is contained in:
Sylvain 2022-10-28 09:40:51 +02:00
parent 65ded9d847
commit d9eee1aa3f

View File

@ -83,7 +83,7 @@ class AvailabilitiesServiceTest < ActiveSupport::TestCase
slots = service.trainings(trainings, @no_subscription, { start: DateTime.current.beginning_of_day, end: 2.days.from_now.end_of_day })
assert_not_empty slots
if DateTime.current.hour >= 10
if DateTime.current.hour >= 6
assert_equal Availability.find(2).slots.count, slots.count
else
assert_equal Availability.find(1).slots.count + Availability.find(2).slots.count, slots.count