1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

fix test to match new specs

This commit is contained in:
Sylvain 2020-03-03 18:01:33 +01:00
parent cfd84286ab
commit 02b16907aa

View File

@ -35,10 +35,7 @@ module Availabilities
assert_not_nil availabilities[0][:machine], "first availability's machine was unexpectedly nil"
assert_equal m.id, availabilities[0][:machine][:id], "first availability's machine does not match the required machine"
# Check that we din't get availabilities from the past
availabilities.each do |a|
assert_not a[:start] < DateTime.current, 'retrieved a slot in the past'
end
# as admin, we can get availabilities from the past (from v4.3.0)
end
test 'get calendar availabilities without spaces' do
@ -60,7 +57,7 @@ module Availabilities
assert_not_empty availabilities, 'no availabilities were found'
assert_not_nil availabilities[0], 'first availability was unexpectedly nil'
assert_not availabilities.map {|a| a[:available_type] }.include?('space'), 'unexpected space availability instead that it was disabled'
assert_not availabilities.map { |a| a[:available_type] }.include?('space'), 'unexpected space availability instead that it was disabled'
# re-enable spaces to keep tests ENV-safe
Rails.application.secrets.fablab_without_spaces = false