Commit ac105c32 authored by Max Richter's avatar Max Richter
Browse files

fix(test): fix some tests after service refactor

parent 14df0059
Pipeline #1825 failed with stages
in 55 seconds
......@@ -99,13 +99,24 @@ func TestAppointmentService_GetAppointment(t *testing.T) {
// Resets building
func ResetBuildingManager() {
BuildingService.New()
BuildingService.CreateBuilding("08:00", "10h", []string{"mon"})
building := &model.Building{}
building = building.New("08:00", "10h", []string{"mon"})
BuildingService.CreateBuilding(building)
}
// Resets building(0) and adds room 200 with capacity 40
func BuildDefBuilding() {
ResetBuildingManager()
_, err := BuildingService.CreateRoom(0, 200, 40)
buildings, _ := BuildingService.GetAllBuildings()
_, err := BuildingService.CreateRoom(buildings[0].ID.String(), &model.Room{
Number: 200,
Capacity: 40,
})
if err != nil {
log.Fatal("BuildDefBuilding: ", err)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment