From 81daf26878d8a7e14c172fc39fc55c36281b1898 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 22 Jan 2020 11:46:04 +0800 Subject: Fix wrong hint when status checking is running on pull request view (#9886) * Fix wrong hint when status checking is running on pull request view * fix lint * fix test * fix test * fix wrong tmpl * fix import * rename function name --- integrations/pull_status_test.go | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'integrations') diff --git a/integrations/pull_status_test.go b/integrations/pull_status_test.go index fde2d3cc9b..95ed755fbb 100644 --- a/integrations/pull_status_test.go +++ b/integrations/pull_status_test.go @@ -11,7 +11,6 @@ import ( "strings" "testing" - "code.gitea.io/gitea/models" api "code.gitea.io/gitea/modules/structs" "github.com/stretchr/testify/assert" @@ -48,20 +47,20 @@ func TestPullCreate_CommitStatus(t *testing.T) { commitID := path.Base(commitURL) - statusList := []models.CommitStatusState{ - models.CommitStatusPending, - models.CommitStatusError, - models.CommitStatusFailure, - models.CommitStatusWarning, - models.CommitStatusSuccess, + statusList := []api.CommitStatusState{ + api.CommitStatusPending, + api.CommitStatusError, + api.CommitStatusFailure, + api.CommitStatusWarning, + api.CommitStatusSuccess, } - statesIcons := map[models.CommitStatusState]string{ - models.CommitStatusPending: "circle icon yellow", - models.CommitStatusSuccess: "check icon green", - models.CommitStatusError: "warning icon red", - models.CommitStatusFailure: "remove icon red", - models.CommitStatusWarning: "warning sign icon yellow", + statesIcons := map[api.CommitStatusState]string{ + api.CommitStatusPending: "circle icon yellow", + api.CommitStatusSuccess: "check icon green", + api.CommitStatusError: "warning icon red", + api.CommitStatusFailure: "remove icon red", + api.CommitStatusWarning: "warning sign icon yellow", } // Update commit status, and check if icon is updated as well -- cgit v1.2.3