finish handler tests

This commit is contained in:
2024-07-16 13:22:46 +02:00
parent 191b010b8e
commit 998850b708
3 changed files with 147 additions and 31 deletions

View File

@ -59,7 +59,7 @@ func (m *testDBRepo) SearchAvailabilityForAllRooms(start, end time.Time) ([]mode
func (m *testDBRepo) GetRoomById(id int) (models.Room, error) {
var room models.Room
if id > 2 {
if id > 2 || id <= 0 {
return room, errors.New("deliberate error")
}
return room, nil