1
0

Add events (#777)

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/777
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
This commit is contained in:
konrad
2021-02-02 22:48:37 +00:00
parent a71aa0c898
commit 0ab9ce9ec4
70 changed files with 1636 additions and 283 deletions

View File

@ -97,6 +97,8 @@ func TestTaskRelation_Create(t *testing.T) {
}
func TestTaskRelation_Delete(t *testing.T) {
u := &user.User{ID: 1}
t.Run("Normal", func(t *testing.T) {
db.LoadAndAssertFixtures(t)
s := db.NewSession()
@ -107,7 +109,7 @@ func TestTaskRelation_Delete(t *testing.T) {
OtherTaskID: 29,
RelationKind: RelationKindSubtask,
}
err := rel.Delete(s)
err := rel.Delete(s, u)
assert.NoError(t, err)
err = s.Commit()
assert.NoError(t, err)
@ -127,7 +129,7 @@ func TestTaskRelation_Delete(t *testing.T) {
OtherTaskID: 3,
RelationKind: RelationKindSubtask,
}
err := rel.Delete(s)
err := rel.Delete(s, u)
assert.Error(t, err)
assert.True(t, IsErrRelationDoesNotExist(err))
})