fix(tests): subscription test fixtures

This commit is contained in:
kolaente 2023-01-12 17:14:17 +01:00
parent bc0724c2ad
commit 8118795a86
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 9 additions and 4 deletions

View File

@ -5,12 +5,12 @@
created: 2021-02-01 15:13:12
- id: 3
entity_type: 2 # project
entity_id: 12 # belongs to parent project 7 TODO
entity_id: 12 # belongs to parent project 7
user_id: 6
created: 2021-02-01 15:13:12
- id: 4
entity_type: 3 # Task
entity_id: 22 # belongs to project 13 which belongs to namespace 8 TODO
entity_id: 22 # belongs to project 13
user_id: 6
created: 2021-02-01 15:13:12
- id: 6
@ -23,3 +23,8 @@
entity_id: 26
user_id: 6
created: 2021-02-01 15:13:12
- id: 8
entity_type: 2 # Project
entity_id: 32
user_id: 6
created: 2021-02-01 15:13:12

View File

@ -295,11 +295,11 @@ func TestSubscriptionGet(t *testing.T) {
s := db.NewSession()
defer s.Close()
// Task 21 belongs to project 12 which the user has subscribed to
// Task 21 belongs to project 32 which the user has subscribed to
sub, err := GetSubscription(s, SubscriptionEntityTask, 21, u)
assert.NoError(t, err)
assert.NotNil(t, sub)
assert.Equal(t, int64(3), sub.ID)
assert.Equal(t, int64(8), sub.ID)
})
})
t.Run("invalid type", func(t *testing.T) {