Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fabian Vitt
good2go
Commits
ac105c32
Commit
ac105c32
authored
Jun 04, 2020
by
Max Richter
Browse files
fix(test): fix some tests after service refactor
parent
14df0059
Pipeline
#1825
failed with stages
in 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
internal/services/appointment_service_test.go
View file @
ac105c32
...
...
@@ -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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment