Skip to content

Commit

Permalink
Improve tests a little
Browse files Browse the repository at this point in the history
  • Loading branch information
andreynering committed Apr 1, 2017
1 parent e5c56fe commit f6e5ce6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions models/issue_watch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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))
}

0 comments on commit f6e5ce6

Please sign in to comment.