aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_comment_test.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-10-17 06:23:08 +0200
committerGitHub <noreply@github.com>2020-10-17 00:23:08 -0400
commitd453533beb197d25b25530dc5f0e3c3c0742d8d1 (patch)
tree6d66e1163333344d91af63e9ab50a82367470b8f /integrations/api_comment_test.go
parent131278ff222f1a8580f20e6bbdff405341403042 (diff)
downloadgitea-d453533beb197d25b25530dc5f0e3c3c0742d8d1.tar.gz
gitea-d453533beb197d25b25530dc5f0e3c3c0742d8d1.zip
[Refactor] Move APIFormat functions into convert package (#12856)
* USER APIFormat -> ToUser * Migrate more and mark APIFormat deprecated * models.Comment APIFormat() -> convert.ToComment * models.Release APIFormat() -> convert.ToRelease * models.Attachments APIFormat() -> convert.ToReleaseAttachments * models.CommitStatus APIFormat() -> convert.ToCommitStatus * finish migration to convert.ToUser * Move Test * Imprufe Test * fix test Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'integrations/api_comment_test.go')
-rw-r--r--integrations/api_comment_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/integrations/api_comment_test.go b/integrations/api_comment_test.go
index 2c754272e5..f64f4a1c9c 100644
--- a/integrations/api_comment_test.go
+++ b/integrations/api_comment_test.go
@@ -11,6 +11,7 @@ import (
"testing"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/modules/convert"
api "code.gitea.io/gitea/modules/structs"
"github.com/stretchr/testify/assert"
@@ -125,7 +126,7 @@ func TestAPIGetComment(t *testing.T) {
DecodeJSON(t, resp, &apiComment)
assert.NoError(t, comment.LoadPoster())
- expect := comment.APIFormat()
+ expect := convert.ToComment(comment)
assert.Equal(t, expect.ID, apiComment.ID)
assert.Equal(t, expect.Poster.FullName, apiComment.Poster.FullName)