summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-01-08 22:14:57 -0500
committerLunny Xiao <xiaolunwen@gmail.com>2017-01-09 11:14:57 +0800
commit862948ab881559e096e2d6670f2df7345079544a (patch)
tree3040d6c8a49ea866db96e66a71d0248568ff5e23
parent4b23e6a69449b985c74ad797257c30250e60ec9a (diff)
downloadgitea-862948ab881559e096e2d6670f2df7345079544a.tar.gz
gitea-862948ab881559e096e2d6670f2df7345079544a.zip
Better coverage and TODOs for update_test (#616)
-rw-r--r--models/update_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/update_test.go b/models/update_test.go
index 141eb2fd51..6d044c08df 100644
--- a/models/update_test.go
+++ b/models/update_test.go
@@ -40,6 +40,10 @@ func TestGetUpdateTaskByUUID(t *testing.T) {
assert.Equal(t, "refName1", task.RefName)
assert.Equal(t, "oldCommitId1", task.OldCommitID)
assert.Equal(t, "newCommitId1", task.NewCommitID)
+
+ _, err = GetUpdateTaskByUUID("invalid")
+ assert.Error(t, err)
+ assert.True(t, IsErrUpdateTaskNotExist(err))
}
func TestDeleteUpdateTaskByUUID(t *testing.T) {
@@ -122,3 +126,5 @@ func TestListToPushCommits(t *testing.T) {
assert.Equal(t, "example@example.com", pushCommits.Commits[1].AuthorEmail)
assert.Equal(t, now, pushCommits.Commits[1].Timestamp)
}
+
+// TODO TestPushUpdate