mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 15:14:12 +01:00
Improve tests a little
This commit is contained in:
parent
e5c56fe30d
commit
f6e5ce65b2
1 changed files with 9 additions and 0 deletions
|
@ -28,9 +28,14 @@ func TestGetIssueWatch(t *testing.T) {
|
|||
_, exists, err := GetIssueWatch(1, 1)
|
||||
assert.Equal(t, true, exists)
|
||||
assert.NoError(t, err)
|
||||
|
||||
_, exists, err = GetIssueWatch(2, 2)
|
||||
assert.Equal(t, true, exists)
|
||||
assert.NoError(t, err)
|
||||
|
||||
_, exists, err = GetIssueWatch(3, 1)
|
||||
assert.Equal(t, false, exists)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestGetIssueWatchers(t *testing.T) {
|
||||
|
@ -39,4 +44,8 @@ func TestGetIssueWatchers(t *testing.T) {
|
|||
iws, err := GetIssueWatchers(1)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 1, len(iws))
|
||||
|
||||
iws, err = GetIssueWatchers(5)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 0, len(iws))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue