1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

fix golint error and rename func for suggestion. (#1997)

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2017-06-17 11:29:59 -05:00
committed by GitHub
parent 6233e88f7f
commit 90f9bb12c6
11 changed files with 30 additions and 25 deletions

View File

@@ -24,7 +24,7 @@ func TestRepoCommits(t *testing.T) {
resp := session.MakeRequest(t, req)
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
doc := NewHtmlParser(t, resp.Body)
doc := NewHTMLParser(t, resp.Body)
commitURL, exists := doc.doc.Find("#commits-table tbody tr td.sha a").Attr("href")
assert.True(t, exists)
assert.NotEmpty(t, commitURL)
@@ -40,7 +40,7 @@ func doTestRepoCommitWithStatus(t *testing.T, state string, classes ...string) {
resp := session.MakeRequest(t, req)
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
doc := NewHtmlParser(t, resp.Body)
doc := NewHTMLParser(t, resp.Body)
// Get first commit URL
commitURL, exists := doc.doc.Find("#commits-table tbody tr td.sha a").Attr("href")
assert.True(t, exists)
@@ -64,7 +64,7 @@ func doTestRepoCommitWithStatus(t *testing.T, state string, classes ...string) {
resp = session.MakeRequest(t, req)
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
doc = NewHtmlParser(t, resp.Body)
doc = NewHTMLParser(t, resp.Body)
// Check if commit status is displayed in message column
sel := doc.doc.Find("#commits-table tbody tr td.message i.commit-status")
assert.Equal(t, sel.Length(), 1)