summaryrefslogtreecommitdiffstats
path: root/models/issue_milestone_test.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2018-02-19 04:39:26 +0200
committerBo-Yi Wu <appleboy.tw@gmail.com>2018-02-19 10:39:26 +0800
commit58893384e848b54687c21d6d2ca38b70b3036ae2 (patch)
tree343c231b40e378ccd089fc7796401f1459fdc1a2 /models/issue_milestone_test.go
parentfb2c176491ebc0f18e6ef25038ca84db561539e2 (diff)
downloadgitea-58893384e848b54687c21d6d2ca38b70b3036ae2.tar.gz
gitea-58893384e848b54687c21d6d2ca38b70b3036ae2.zip
Add issue closed time column to fix activity closed issues list (#3537)
Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>
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{})