2015-05-05 03:10:25 +02:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
RSpec.describe Availability, type: :model do
|
|
|
|
|
|
|
|
describe 'create' do
|
|
|
|
it 'is success with start at, end at and type'
|
|
|
|
it 'is invalid without start at'
|
|
|
|
it 'is invalid without end at'
|
|
|
|
it 'is invalid without type'
|
2016-03-23 18:39:41 +01:00
|
|
|
it 'is invalid type isnt in [training, machines, event]'
|
|
|
|
it 'is invalid without training_ids when type training'
|
|
|
|
it 'is invalid without machine_ids when type machines'
|
2015-05-05 03:10:25 +02:00
|
|
|
end
|
|
|
|
|
2016-03-23 18:39:41 +01:00
|
|
|
it 'should can associate one or many reservations'
|
|
|
|
|
|
|
|
it 'should can destroy if dont any reservations'
|
|
|
|
|
2015-05-05 03:10:25 +02:00
|
|
|
it 'should get a title'
|
|
|
|
|
|
|
|
it 'should set a number of places'
|
|
|
|
|
2016-03-23 18:39:41 +01:00
|
|
|
it 'should be completed when number of reservations equal number of places'
|
2015-05-05 03:10:25 +02:00
|
|
|
end
|