mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
adds a test to availability model test
This commit is contained in:
parent
5d38f1e3a5
commit
26e3f5bf8c
@ -6,4 +6,10 @@ class AvailabilityTest < ActiveSupport::TestCase
|
||||
assert a.invalid?
|
||||
assert a.errors.key?(:end_at)
|
||||
end
|
||||
|
||||
test "if type available_type is 'machines' check that there is minimum 1 association" do
|
||||
a = Availability.new(start_at: Time.now, end_at: 2.hours.from_now, available_type: 'machines')
|
||||
assert a.invalid?
|
||||
assert a.errors.key?(:machine_ids)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user