1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

test: add first few unit tests

This commit is contained in:
Ferdinand Mütsch
2020-11-08 12:46:12 +01:00
parent 35cdc7b485
commit ad8168801c
17 changed files with 519 additions and 11 deletions

View File

@ -24,7 +24,7 @@ type Heartbeat struct {
}
func (h *Heartbeat) Valid() bool {
return h.User != nil && h.UserID != "" && h.Time != CustomTime(time.Time{})
return h.User != nil && h.UserID != "" && h.User.ID == h.UserID && h.Time != CustomTime(time.Time{})
}
func (h *Heartbeat) Augment(languageMappings map[string]string) {