add tests for availabilityJson
This commit is contained in:
@ -29,7 +29,10 @@ 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) {
|
||||
return false, nil
|
||||
if roomID == 2 {
|
||||
return false, errors.New("deliberate error")
|
||||
}
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// SearchAvailabilityForAllRooms returns a slice of rooms, if any, for given date range
|
||||
|
Reference in New Issue
Block a user