mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-21 21:27:13 +00:00
fix: Add created_unix and updated_unix to repo1 fixture
This commit is contained in:
parent
a1762a6f9b
commit
74048f772e
|
@ -29,7 +29,8 @@
|
||||||
size: 7597
|
size: 7597
|
||||||
is_fsck_enabled: true
|
is_fsck_enabled: true
|
||||||
close_issues_via_commit_in_any_branch: false
|
close_issues_via_commit_in_any_branch: false
|
||||||
|
created_unix: 1731254961
|
||||||
|
updated_unix: 1731254961
|
||||||
-
|
-
|
||||||
id: 2
|
id: 2
|
||||||
owner_id: 2
|
owner_id: 2
|
||||||
|
|
|
@ -20,7 +20,7 @@ func TestRepoLastUpdatedTime(t *testing.T) {
|
||||||
req := NewRequest(t, "GET", "/explore/repos?q=repo1")
|
req := NewRequest(t, "GET", "/explore/repos?q=repo1")
|
||||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||||
doc := NewHTMLParser(t, resp.Body)
|
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 := ""
|
buf := ""
|
||||||
findTextNonNested(t, node, &buf)
|
findTextNonNested(t, node, &buf)
|
||||||
|
@ -28,10 +28,7 @@ func TestRepoLastUpdatedTime(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Relative time should be present as a descendent
|
// Relative time should be present as a descendent
|
||||||
{
|
assert.Contains(t, node.Find("relative-time").Text(), "2024-11-10")
|
||||||
relativeTime := node.Find("relative-time").Text()
|
|
||||||
assert.True(t, strings.HasPrefix(relativeTime, "19")) // ~1970, might underflow with timezone
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestBranchLastUpdatedTime(t *testing.T) {
|
func TestBranchLastUpdatedTime(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue