mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-14 21:15:18 +08:00
trim
This commit is contained in:
parent
bebf59175a
commit
e632d98bec
@ -8,6 +8,7 @@ import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"path"
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
@ -63,7 +64,7 @@ func TestRepoCommits(t *testing.T) {
|
||||
commitHref := doc.doc.Find("#commits-table tr:first-child .commit-id-short").AttrOr("href", "")
|
||||
assert.Equal(t, "/user2/repo1/commit/985f0301dba5e7b34be866819cd15ad3d8f508ee", commitHref)
|
||||
authorElem := doc.doc.Find("#commits-table tr:first-child .author-wrapper")
|
||||
assert.Equal(t, "6543", authorElem.Text())
|
||||
assert.Equal(t, "6543", strings.TrimSpace(authorElem.Text()))
|
||||
assert.Equal(t, "span", authorElem.Nodes[0].Data)
|
||||
})
|
||||
|
||||
@ -74,7 +75,7 @@ func TestRepoCommits(t *testing.T) {
|
||||
commitHref := doc.doc.Find(".latest-commit .commit-id-short").AttrOr("href", "")
|
||||
assert.Equal(t, "/user2/repo1/commit/985f0301dba5e7b34be866819cd15ad3d8f508ee", commitHref)
|
||||
authorElem := doc.doc.Find(".latest-commit .author-wrapper")
|
||||
assert.Equal(t, "6543", authorElem.Text())
|
||||
assert.Equal(t, "6543", strings.TrimSpace(authorElem.Text()))
|
||||
assert.Equal(t, "span", authorElem.Nodes[0].Data)
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user