mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 06:03:51 +03:00
fix: Add created_unix and updated_unix to repo1 fixture
This commit is contained in:
parent
a1762a6f9b
commit
74048f772e
2 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue