summaryrefslogtreecommitdiffstats
path: root/modules/convert/issue_test.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-09-05 19:38:54 +0200
committerGitHub <noreply@github.com>2020-09-05 13:38:54 -0400
commit1ea1cade8559e1d2aa75916c0dbfe31903423101 (patch)
treebcbf57e73c97b741f2c710804acb0b392fe71e79 /modules/convert/issue_test.go
parent74047864202f2b34ded176597ca0b94034665b52 (diff)
downloadgitea-1ea1cade8559e1d2aa75916c0dbfe31903423101.tar.gz
gitea-1ea1cade8559e1d2aa75916c0dbfe31903423101.zip
Add Created & Updated to Milestone (#12662)
* Add Created and Updated to Milestone table and expose via API * Expose to UI - To Overloaded ?!? * fix unit test Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/convert/issue_test.go')
-rw-r--r--modules/convert/issue_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/convert/issue_test.go b/modules/convert/issue_test.go
index e5676293f8..2f8f56e99a 100644
--- a/modules/convert/issue_test.go
+++ b/modules/convert/issue_test.go
@@ -34,6 +34,8 @@ func TestMilestone_APIFormat(t *testing.T) {
IsClosed: false,
NumOpenIssues: 5,
NumClosedIssues: 6,
+ CreatedUnix: timeutil.TimeStamp(time.Date(1999, time.January, 1, 0, 0, 0, 0, time.UTC).Unix()),
+ UpdatedUnix: timeutil.TimeStamp(time.Date(1999, time.March, 1, 0, 0, 0, 0, time.UTC).Unix()),
DeadlineUnix: timeutil.TimeStamp(time.Date(2000, time.January, 1, 0, 0, 0, 0, time.UTC).Unix()),
}
assert.Equal(t, api.Milestone{
@@ -43,6 +45,8 @@ func TestMilestone_APIFormat(t *testing.T) {
Description: milestone.Content,
OpenIssues: milestone.NumOpenIssues,
ClosedIssues: milestone.NumClosedIssues,
+ Created: milestone.CreatedUnix.AsTime(),
+ Updated: milestone.UpdatedUnix.AsTimePtr(),
Deadline: milestone.DeadlineUnix.AsTimePtr(),
}, *ToAPIMilestone(milestone))
}