From f6e5ce65b28fb6c97d9011c1fbf2950acf7c0647 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sat, 1 Apr 2017 10:05:58 -0300 Subject: [PATCH] Improve tests a little --- models/issue_watch_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/models/issue_watch_test.go b/models/issue_watch_test.go index 5b820ded7b21..d8b456c3ae0c 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)) }