fix(tests): subscription test fixtures
This commit is contained in:
parent
5e6bff20f8
commit
03b7fa6dd3
@ -5,12 +5,12 @@
|
|||||||
created: 2021-02-01 15:13:12
|
created: 2021-02-01 15:13:12
|
||||||
- id: 3
|
- id: 3
|
||||||
entity_type: 2 # project
|
entity_type: 2 # project
|
||||||
entity_id: 12 # belongs to parent project 7 TODO
|
entity_id: 12 # belongs to parent project 7
|
||||||
user_id: 6
|
user_id: 6
|
||||||
created: 2021-02-01 15:13:12
|
created: 2021-02-01 15:13:12
|
||||||
- id: 4
|
- id: 4
|
||||||
entity_type: 3 # Task
|
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
|
user_id: 6
|
||||||
created: 2021-02-01 15:13:12
|
created: 2021-02-01 15:13:12
|
||||||
- id: 6
|
- id: 6
|
||||||
@ -23,3 +23,8 @@
|
|||||||
entity_id: 26
|
entity_id: 26
|
||||||
user_id: 6
|
user_id: 6
|
||||||
created: 2021-02-01 15:13:12
|
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
|
||||||
|
@ -295,11 +295,11 @@ func TestSubscriptionGet(t *testing.T) {
|
|||||||
s := db.NewSession()
|
s := db.NewSession()
|
||||||
defer s.Close()
|
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)
|
sub, err := GetSubscription(s, SubscriptionEntityTask, 21, u)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.NotNil(t, sub)
|
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) {
|
t.Run("invalid type", func(t *testing.T) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user