spec/tests/period_spec.rb in torque-postgresql-2.1.3 vs spec/tests/period_spec.rb in torque-postgresql-2.2.0

- old
+ new

@@ -264,9 +264,18 @@ instance.period = 1.hour.ago.utc..1.hour.from_now.utc expect(instance).to be_current_period instance.period = 4.hour.from_now.utc..6.hour.from_now.utc expect(instance).not_to be_current_period + + instance.period = [nil, 4.hours.ago.utc] + expect(instance).not_to be_current_period + + instance.period = [4.hours.from_now.utc, nil] + expect(instance).not_to be_current_period + + instance.period = [nil, nil] + expect(instance).to be_current_period end it 'checks fro current based on a value' do instance.period = 1.hour.ago.utc..1.hour.from_now.utc expect(instance).to be_current_period_on(5.minutes.from_now.utc)