From 02b16907aad5b0d6c51027e410372d4f31c3c75d Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 3 Mar 2020 18:01:33 +0100 Subject: [PATCH] fix test to match new specs --- test/integration/availabilities/as_admin_test.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/integration/availabilities/as_admin_test.rb b/test/integration/availabilities/as_admin_test.rb index 092da0796..0b2a1f6c2 100644 --- a/test/integration/availabilities/as_admin_test.rb +++ b/test/integration/availabilities/as_admin_test.rb @@ -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