Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-22 01:44:24 +01:00

fix: Add created_unix and updated_unix to repo1 fixture

This commit is contained in:
Gusted 2024-11-10 14:49:13 +01:00
parent a1762a6f9b
commit 74048f772e
No known key found for this signature in database
GPG key ID: FD821B732837125F
2 changed files with 4 additions and 6 deletions

View file

@ -29,7 +29,8 @@
size: 7597
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
created_unix: 1731254961
updated_unix: 1731254961
-
id: 2
owner_id: 2

View file

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