1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

(test) fix a test for availabilites

This commit is contained in:
Du Peng 2023-07-10 13:46:02 +02:00
parent e430ae14e2
commit 390cf72ddf

View File

@ -35,12 +35,12 @@ class Availabilities::AvailabilitiesServiceTest < ActiveSupport::TestCase
assert_empty slots assert_empty slots
end end
test 'admin cannot see past availabilities further than 1 month' do test 'admin can see past availabilities further than 1 month' do
service = Availabilities::AvailabilitiesService.new(@admin) service = Availabilities::AvailabilitiesService.new(@admin)
slots = service.machines([Machine.find(2)], @no_subscription, slots = service.machines([Machine.find(2)], @no_subscription,
{ start: Time.zone.parse('2015-06-15').beginning_of_day, end: Time.zone.parse('2015-06-15').end_of_day }) { start: Time.zone.parse('2015-06-15').beginning_of_day, end: Time.zone.parse('2015-06-15').end_of_day })
assert_empty slots assert_not_empty slots
end end
test 'admin can see past availabilities in 1 month ago' do test 'admin can see past availabilities in 1 month ago' do