Better coverage and TODOs for update_test (#616)
This commit is contained in:
parent
4b23e6a694
commit
862948ab88
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,10 @@ func TestGetUpdateTaskByUUID(t *testing.T) {
|
||||||
assert.Equal(t, "refName1", task.RefName)
|
assert.Equal(t, "refName1", task.RefName)
|
||||||
assert.Equal(t, "oldCommitId1", task.OldCommitID)
|
assert.Equal(t, "oldCommitId1", task.OldCommitID)
|
||||||
assert.Equal(t, "newCommitId1", task.NewCommitID)
|
assert.Equal(t, "newCommitId1", task.NewCommitID)
|
||||||
|
|
||||||
|
_, err = GetUpdateTaskByUUID("invalid")
|
||||||
|
assert.Error(t, err)
|
||||||
|
assert.True(t, IsErrUpdateTaskNotExist(err))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDeleteUpdateTaskByUUID(t *testing.T) {
|
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, "example@example.com", pushCommits.Commits[1].AuthorEmail)
|
||||||
assert.Equal(t, now, pushCommits.Commits[1].Timestamp)
|
assert.Equal(t, now, pushCommits.Commits[1].Timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO TestPushUpdate
|
||||||
|
|
Reference in a new issue