Skip to content

Commit

Permalink
fix api with new heartbeat types
Browse files Browse the repository at this point in the history
  • Loading branch information
almostinf committed Nov 5, 2024
1 parent b82f9ab commit 82fcf1c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion api/controller/contact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ func TestRemoveContact(t *testing.T) {
Convey("With emergency contact", func() {
emergencyContact := datatypes.EmergencyContact{
ContactID: contactID,
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifierOff},
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifier},
}
dataBase.EXPECT().GetTeamSubscriptionIDs(teamID).Return(make([]string, 0), nil)
dataBase.EXPECT().GetEmergencyContact(contactID).Return(emergencyContact, nil)
Expand Down
6 changes: 3 additions & 3 deletions api/controller/emergency_contact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (

testEmergencyContact = datatypes.EmergencyContact{
ContactID: testContactID,
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifierOff},
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifier},
}
testEmergencyContact2 = datatypes.EmergencyContact{
ContactID: testContactID2,
Expand All @@ -30,7 +30,7 @@ var (

testEmergencyContactDTO = dto.EmergencyContact{
ContactID: testContactID,
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifierOff},
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifier},
}
testEmergencyContact2DTO = dto.EmergencyContact{
ContactID: testContactID2,
Expand Down Expand Up @@ -286,7 +286,7 @@ func TestUpdateEmergencyContact(t *testing.T) {

Convey("With empty contact id", func() {
emergencyContactDTO := dto.EmergencyContact{
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifierOff},
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifier},
}
database.EXPECT().SaveEmergencyContact(testEmergencyContact).Return(nil)

Expand Down
2 changes: 1 addition & 1 deletion api/dto/emergency_contact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var (

testEmergencyContact = datatypes.EmergencyContact{
ContactID: testContactID,
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifierOff},
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifier},
}
)

Expand Down
2 changes: 1 addition & 1 deletion api/handler/contact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ func TestRemoveContact(t *testing.T) {

emergencyContact := datatypes.EmergencyContact{
ContactID: contactID,
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifierOff},
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifier},
}

mockDb.EXPECT().GetUserSubscriptionIDs(defaultLogin).Return([]string{"test"}, nil).Times(1)
Expand Down
6 changes: 3 additions & 3 deletions api/handler/emergency_contact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var (

testEmergencyContact = datatypes.EmergencyContact{
ContactID: testContactID,
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifierOff},
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifier},
}
testEmergencyContact2 = datatypes.EmergencyContact{
ContactID: testContactID2,
Expand Down Expand Up @@ -247,7 +247,7 @@ func TestCreateEmergencyContact(t *testing.T) {

Convey("Try to create emergency contact without contact id", func() {
emergencyContact := datatypes.EmergencyContact{
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifierOff},
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifier},
}
emergencyContactDTO := dto.EmergencyContact(emergencyContact)

Expand Down Expand Up @@ -473,7 +473,7 @@ func TestUpdateEmergencyContact(t *testing.T) {

Convey("Successfully update emergency contact without contact id in dto", func() {
emergencyContact := datatypes.EmergencyContact{
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifierOff},
HeartbeatTypes: []datatypes.HeartbeatType{datatypes.HeartbeatNotifier},
}
emergencyContactDTO := dto.EmergencyContact(emergencyContact)

Expand Down

0 comments on commit 82fcf1c

Please sign in to comment.