aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/pull_status_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-01-22 11:46:04 +0800
committerGitHub <noreply@github.com>2020-01-22 11:46:04 +0800
commit81daf26878d8a7e14c172fc39fc55c36281b1898 (patch)
tree9d4d43bf2e12cdc9c56196938d0618e9577cd1b6 /integrations/pull_status_test.go
parentcca13ae2acf1ef7a3b0516a8774dff0365b73697 (diff)
downloadgitea-81daf26878d8a7e14c172fc39fc55c36281b1898.tar.gz
gitea-81daf26878d8a7e14c172fc39fc55c36281b1898.zip
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
Diffstat (limited to 'integrations/pull_status_test.go')
-rw-r--r--integrations/pull_status_test.go25
1 files changed, 12 insertions, 13 deletions
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