summaryrefslogtreecommitdiffstats
path: root/models/issue_milestone_test.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2021-06-21 20:34:58 +0200
committerGitHub <noreply@github.com>2021-06-21 14:34:58 -0400
commit36c158bc9375d7ebb9aa749ccd6718d0d68e96d2 (patch)
treebd89ab2d689395a33b45eda3102fb8e5e1c3c8e9 /models/issue_milestone_test.go
parent6a083a7234190d078ac51878bb8f39aa53ef1974 (diff)
downloadgitea-36c158bc9375d7ebb9aa749ccd6718d0d68e96d2.tar.gz
gitea-36c158bc9375d7ebb9aa749ccd6718d0d68e96d2.zip
Update milestone counters on new issue. (#16183)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'models/issue_milestone_test.go')
-rw-r--r--models/issue_milestone_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/issue_milestone_test.go b/models/issue_milestone_test.go
index af264aa274..5406129884 100644
--- a/models/issue_milestone_test.go
+++ b/models/issue_milestone_test.go
@@ -215,7 +215,7 @@ func TestChangeMilestoneStatus(t *testing.T) {
CheckConsistencyFor(t, &Repository{ID: milestone.RepoID}, &Milestone{})
}
-func TestUpdateMilestoneClosedNum(t *testing.T) {
+func TestUpdateMilestoneCounters(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
issue := AssertExistsAndLoadBean(t, &Issue{MilestoneID: 1},
"is_closed=0").(*Issue)
@@ -224,14 +224,14 @@ func TestUpdateMilestoneClosedNum(t *testing.T) {
issue.ClosedUnix = timeutil.TimeStampNow()
_, err := x.ID(issue.ID).Cols("is_closed", "closed_unix").Update(issue)
assert.NoError(t, err)
- assert.NoError(t, updateMilestoneClosedNum(x, issue.MilestoneID))
+ assert.NoError(t, updateMilestoneCounters(x, issue.MilestoneID))
CheckConsistencyFor(t, &Milestone{})
issue.IsClosed = false
issue.ClosedUnix = 0
_, err = x.ID(issue.ID).Cols("is_closed", "closed_unix").Update(issue)
assert.NoError(t, err)
- assert.NoError(t, updateMilestoneClosedNum(x, issue.MilestoneID))
+ assert.NoError(t, updateMilestoneCounters(x, issue.MilestoneID))
CheckConsistencyFor(t, &Milestone{})
}