summaryrefslogtreecommitdiffstats
path: root/models/issue_milestone_test.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-04-30 06:15:39 +0200
committerGitHub <noreply@github.com>2020-04-30 01:15:39 -0300
commitbfda0f38646f66dbae2767eed3097489c456ebf5 (patch)
treeb3c915a6fb63215cd2c31c24bf4d7da332503565 /models/issue_milestone_test.go
parentcbf5dffaf29c1e871342c15478b33e9229a7f9d2 (diff)
downloadgitea-bfda0f38646f66dbae2767eed3097489c456ebf5.tar.gz
gitea-bfda0f38646f66dbae2767eed3097489c456ebf5.zip
[API] ListIssues add filter for milestones (#10148)
* Refactor Issue Filter Func * ListIssues add filter for milestones * as per @lafriks * documentation ...
Diffstat (limited to 'models/issue_milestone_test.go')
-rw-r--r--models/issue_milestone_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/issue_milestone_test.go b/models/issue_milestone_test.go
index 607d36c31c..da4e77ffeb 100644
--- a/models/issue_milestone_test.go
+++ b/models/issue_milestone_test.go
@@ -240,14 +240,14 @@ func TestUpdateMilestoneClosedNum(t *testing.T) {
issue.IsClosed = true
issue.ClosedUnix = timeutil.TimeStampNow()
- _, err := x.Cols("is_closed", "closed_unix").Update(issue)
+ _, err := x.ID(issue.ID).Cols("is_closed", "closed_unix").Update(issue)
assert.NoError(t, err)
assert.NoError(t, updateMilestoneClosedNum(x, issue.MilestoneID))
CheckConsistencyFor(t, &Milestone{})
issue.IsClosed = false
issue.ClosedUnix = 0
- _, err = x.Cols("is_closed", "closed_unix").Update(issue)
+ _, err = x.ID(issue.ID).Cols("is_closed", "closed_unix").Update(issue)
assert.NoError(t, err)
assert.NoError(t, updateMilestoneClosedNum(x, issue.MilestoneID))
CheckConsistencyFor(t, &Milestone{})