func newTestNote(t *testing.T, db data.DB, u *models.User) *models.Note { note := models.NewNote() note.SetID(db.NewID()) note.CreatedAt = time.Now() note.OwnerId = u.ID().String() note.UpdatedAt = time.Now() if err := db.Save(note); err != nil { t.Fatal("newTestNote Error: %s", err) } return note }
func newTestPerson(t *testing.T, db data.DB, u *models.User) *models.Person { person := models.NewPerson() person.SetID(db.NewID()) person.CreatedAt = time.Now() person.OwnerId = u.ID().String() person.UpdatedAt = time.Now() if err := db.Save(person); err != nil { t.Fatalf("newTestPerson Error: %s", err) } return person }