diff options
Diffstat (limited to 'models/issue_milestone_test.go')
-rw-r--r-- | models/issue_milestone_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/models/issue_milestone_test.go b/models/issue_milestone_test.go index c57f92439e..c9b53f4f4a 100644 --- a/models/issue_milestone_test.go +++ b/models/issue_milestone_test.go @@ -253,3 +253,14 @@ func TestDeleteMilestoneByRepoID(t *testing.T) { assert.NoError(t, DeleteMilestoneByRepoID(NonexistentID, NonexistentID)) } + +func TestMilestoneList_LoadTotalTrackedTimes(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + miles := MilestoneList{ + AssertExistsAndLoadBean(t, &Milestone{ID: 1}).(*Milestone), + } + + assert.NoError(t, miles.LoadTotalTrackedTimes()) + + assert.Equal(t, miles[0].TotalTrackedTime, int64(3662)) +} |