forked from gitea/gitea
fix test + add new case
This commit is contained in:
parent
47ba722e19
commit
9f3b25c358
|
@ -13,3 +13,19 @@
|
||||||
is_watching: false
|
is_watching: false
|
||||||
created_unix: 946684800
|
created_unix: 946684800
|
||||||
updated_unix: 946684800
|
updated_unix: 946684800
|
||||||
|
|
||||||
|
-
|
||||||
|
id: 3
|
||||||
|
user_id: 2
|
||||||
|
issue_id: 3
|
||||||
|
is_watching: true
|
||||||
|
created_unix: 946684800
|
||||||
|
updated_unix: 946684800
|
||||||
|
|
||||||
|
-
|
||||||
|
id: 3
|
||||||
|
user_id: 1
|
||||||
|
issue_id: 3
|
||||||
|
is_watching: false
|
||||||
|
created_unix: 946684800
|
||||||
|
updated_unix: 946684800
|
||||||
|
|
|
@ -48,6 +48,12 @@ func TestGetIssueWatchers(t *testing.T) {
|
||||||
|
|
||||||
iws, err = GetIssueWatchers(2)
|
iws, err = GetIssueWatchers(2)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
// Watcher is not watching
|
||||||
|
assert.Equal(t, 0, len(iws))
|
||||||
|
|
||||||
|
iws, err = GetIssueWatchers(3)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
// Watcher is not watching
|
||||||
assert.Equal(t, 1, len(iws))
|
assert.Equal(t, 1, len(iws))
|
||||||
|
|
||||||
iws, err = GetIssueWatchers(5)
|
iws, err = GetIssueWatchers(5)
|
||||||
|
|
Loading…
Reference in New Issue