diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-22 11:46:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-22 11:46:04 +0800 |
commit | 81daf26878d8a7e14c172fc39fc55c36281b1898 (patch) | |
tree | 9d4d43bf2e12cdc9c56196938d0618e9577cd1b6 /models/commit_status_test.go | |
parent | cca13ae2acf1ef7a3b0516a8774dff0365b73697 (diff) | |
download | gitea-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 'models/commit_status_test.go')
-rw-r--r-- | models/commit_status_test.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/models/commit_status_test.go b/models/commit_status_test.go index 97783ae6f1..90d72cd74d 100644 --- a/models/commit_status_test.go +++ b/models/commit_status_test.go @@ -7,6 +7,7 @@ package models import ( "testing" + "code.gitea.io/gitea/modules/structs" "github.com/stretchr/testify/assert" ) @@ -23,22 +24,22 @@ func TestGetCommitStatuses(t *testing.T) { assert.Len(t, statuses, 5) assert.Equal(t, "ci/awesomeness", statuses[0].Context) - assert.Equal(t, CommitStatusPending, statuses[0].State) + assert.Equal(t, structs.CommitStatusPending, statuses[0].State) assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[0].APIURL()) assert.Equal(t, "cov/awesomeness", statuses[1].Context) - assert.Equal(t, CommitStatusWarning, statuses[1].State) + assert.Equal(t, structs.CommitStatusWarning, statuses[1].State) assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[1].APIURL()) assert.Equal(t, "cov/awesomeness", statuses[2].Context) - assert.Equal(t, CommitStatusSuccess, statuses[2].State) + assert.Equal(t, structs.CommitStatusSuccess, statuses[2].State) assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[2].APIURL()) assert.Equal(t, "ci/awesomeness", statuses[3].Context) - assert.Equal(t, CommitStatusFailure, statuses[3].State) + assert.Equal(t, structs.CommitStatusFailure, statuses[3].State) assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[3].APIURL()) assert.Equal(t, "deploy/awesomeness", statuses[4].Context) - assert.Equal(t, CommitStatusError, statuses[4].State) + assert.Equal(t, structs.CommitStatusError, statuses[4].State) assert.Equal(t, "https://try.gitea.io/api/v1/repos/user2/repo1/statuses/1234123412341234123412341234123412341234", statuses[4].APIURL()) } |