mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Refactor struct's time to remove unnecessary memory usage (#3142)
* refactor struct's time to remove unnecessary memory usage * use AsTimePtr simple code * fix tests * fix time compare * fix template on gpg * use AddDuration instead of Add
This commit is contained in:
		| @@ -33,9 +33,9 @@ func TestCreateComment(t *testing.T) { | ||||
| 	assert.EqualValues(t, "Hello", comment.Content) | ||||
| 	assert.EqualValues(t, issue.ID, comment.IssueID) | ||||
| 	assert.EqualValues(t, doer.ID, comment.PosterID) | ||||
| 	AssertInt64InRange(t, now, then, comment.CreatedUnix) | ||||
| 	AssertInt64InRange(t, now, then, int64(comment.CreatedUnix)) | ||||
| 	AssertExistsAndLoadBean(t, comment) // assert actually added to DB | ||||
|  | ||||
| 	updatedIssue := AssertExistsAndLoadBean(t, &Issue{ID: issue.ID}).(*Issue) | ||||
| 	AssertInt64InRange(t, now, then, updatedIssue.UpdatedUnix) | ||||
| 	AssertInt64InRange(t, now, then, int64(updatedIssue.UpdatedUnix)) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user