finish availabilityjson test

This commit is contained in:
2024-07-14 14:57:13 +02:00
parent 3f1dfeabc2
commit 4debe0e14e
2 changed files with 39 additions and 1 deletions

View File

@ -30,6 +30,9 @@ func (m *testDBRepo) InsertRoomRestriction(r models.RoomRestriction) error {
// SearchAvailabilityByDatesByRoomID returns true if availability exists for roomID, and false if no availability
func (m *testDBRepo) SearchAvailabilityByDatesByRoomID(start, end time.Time, roomID int) (bool, error) {
if roomID == 2 {
return false, nil
}
if roomID == 100 {
return false, errors.New("deliberate error")
}
return true, nil