The VacationRequest model implements validation method
cannot_intersect_with_other_vacations() that looks into DB and checks
if there are any records that intersect with the new record.
There must be no records that have days from the period of the new
vacation request.
Update factory for users so that it generates valid vacation requests
Update factory for vacation requests so that it initialize start_date
property dynamically, that is, with the Time.zone.now() method.
Update tests for VacationRequest model
Test VacationRequest#cannot_intersect_with_other_vacations method.
Rework test for validation of inclusion of actual_end_date property in
permitted date range.
Update BB VacationRequest model
Move the user_id attribute from the list of defaults to the list
of expected attributes.
Update BB VacationRequestForm view
Add listener for the error event on VacationRequest model.
The VacationRequest model implements validation method
cannot_intersect_with_other_vacations()
that looks into DB and checks if there are any records that intersect with the new record. There must be no records that have days from the period of the new vacation request.Update factory for users so that it generates valid vacation requests
Update factory for vacation requests so that it initialize
start_date
property dynamically, that is, with theTime.zone.now()
method.Update tests for VacationRequest model Test
VacationRequest#cannot_intersect_with_other_vacations
method. Rework test for validation of inclusion ofactual_end_date
property in permitted date range.Update BB VacationRequest model Move the
user_id
attribute from the list of defaults to the list of expected attributes.Update BB VacationRequestForm view Add listener for the
error
event on VacationRequest model.Update copyright statement
@alazarchuk , @rubycop , @epmlys