summaryrefslogtreecommitdiffstats
path: root/models/issue_milestone_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issue_milestone_test.go')
-rw-r--r--models/issue_milestone_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/models/issue_milestone_test.go b/models/issue_milestone_test.go
index f7987d45ad..c57f92439e 100644
--- a/models/issue_milestone_test.go
+++ b/models/issue_milestone_test.go
@@ -214,13 +214,15 @@ func TestChangeMilestoneIssueStats(t *testing.T) {
"is_closed=0").(*Issue)
issue.IsClosed = true
- _, err := x.Cols("is_closed").Update(issue)
+ issue.ClosedUnix = util.TimeStampNow()
+ _, err := x.Cols("is_closed", "closed_unix").Update(issue)
assert.NoError(t, err)
assert.NoError(t, changeMilestoneIssueStats(x.NewSession(), issue))
CheckConsistencyFor(t, &Milestone{})
issue.IsClosed = false
- _, err = x.Cols("is_closed").Update(issue)
+ issue.ClosedUnix = 0
+ _, err = x.Cols("is_closed", "closed_unix").Update(issue)
assert.NoError(t, err)
assert.NoError(t, changeMilestoneIssueStats(x.NewSession(), issue))
CheckConsistencyFor(t, &Milestone{})