This commit is contained in:
silverwind 2025-12-13 16:03:35 +01:00
parent bebf59175a
commit e632d98bec
No known key found for this signature in database
GPG Key ID: 2E62B41C93869443

View File

@ -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)
})
}