aboutsummaryrefslogtreecommitdiffstats
path: root/models/issue_watch_test.go
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2017-04-01 10:05:58 -0300
committerAndrey Nering <andrey.nering@gmail.com>2017-04-01 10:05:58 -0300
commitf6e5ce65b28fb6c97d9011c1fbf2950acf7c0647 (patch)
tree35247211591dab648484ef559b513ea83dab0031 /models/issue_watch_test.go
parente5c56fe30ddfe2ea5b065a286cb467a914d044e8 (diff)
downloadgitea-f6e5ce65b28fb6c97d9011c1fbf2950acf7c0647.tar.gz
gitea-f6e5ce65b28fb6c97d9011c1fbf2950acf7c0647.zip
Improve tests a little
Diffstat (limited to 'models/issue_watch_test.go')
-rw-r--r--models/issue_watch_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/models/issue_watch_test.go b/models/issue_watch_test.go
index 5b820ded7b..d8b456c3ae 100644
--- a/models/issue_watch_test.go
+++ b/models/issue_watch_test.go
@@ -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))
}