summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOtto <otto@codeberg.org>2024-11-11 15:22:32 +0100
committerOtto <otto@codeberg.org>2024-11-11 15:22:32 +0100
commit3531710dc6843994dc304f59bddb82fca1fbeb2b (patch)
tree49bf284997d8a65cc3799fd13a3daa64e79bbcb1 /tests
parentUpdate module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.62.0 ... (diff)
parentfix: Add created_unix and updated_unix to repo1 fixture (diff)
downloadforgejo-3531710dc6843994dc304f59bddb82fca1fbeb2b.tar.xz
forgejo-3531710dc6843994dc304f59bddb82fca1fbeb2b.zip
Merge pull request 'fix: Proper parsing of date for git commits' (#5892) from gusted/forgejo-port-32409 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5892 Reviewed-by: Otto <otto@codeberg.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/last_updated_time_test.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/integration/last_updated_time_test.go b/tests/integration/last_updated_time_test.go
index aefcec5cc7..34ba9a471f 100644
--- a/tests/integration/last_updated_time_test.go
+++ b/tests/integration/last_updated_time_test.go
@@ -20,7 +20,7 @@ func TestRepoLastUpdatedTime(t *testing.T) {
req := NewRequest(t, "GET", "/explore/repos?q=repo1")
resp := session.MakeRequest(t, req, http.StatusOK)
doc := NewHTMLParser(t, resp.Body)
- node := doc.doc.Find(".flex-item-body").First()
+ node := doc.doc.Find(".flex-item-main:has(a[href='/user2/repo1']) .flex-item-body").First()
{
buf := ""
findTextNonNested(t, node, &buf)
@@ -28,10 +28,7 @@ func TestRepoLastUpdatedTime(t *testing.T) {
}
// Relative time should be present as a descendent
- {
- relativeTime := node.Find("relative-time").Text()
- assert.True(t, strings.HasPrefix(relativeTime, "19")) // ~1970, might underflow with timezone
- }
+ assert.Contains(t, node.Find("relative-time").Text(), "2024-11-10")
}
func TestBranchLastUpdatedTime(t *testing.T) {