mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-23 13:13:38 +09:00
feat(ui): add "follow rename" to file commit history list (#34994)
Fix #28253 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
co-authored by
wxiaoguang
parent
735e940a61
commit
b2748d7654
@@ -32,4 +32,24 @@ func TestPagination(t *testing.T) {
|
||||
params.Del("foo")
|
||||
v, _ = url.ParseQuery(string(p.GetParams()))
|
||||
assert.Equal(t, params, v)
|
||||
|
||||
p = NewPagination(-1, 1, 1, 1)
|
||||
p.WithUnlimitedPaging(0, false)
|
||||
assert.Zero(t, p.Paginater.TotalPages())
|
||||
assert.False(t, p.Paginater.HasNext())
|
||||
|
||||
p = NewPagination(-1, 1, 1, 1)
|
||||
p.WithUnlimitedPaging(10, false)
|
||||
assert.Equal(t, 1, p.Paginater.TotalPages()) // first page, no next, so it should know that the total page number is 1
|
||||
assert.False(t, p.Paginater.HasNext())
|
||||
|
||||
p = NewPagination(-1, 1, 2, 1)
|
||||
p.WithUnlimitedPaging(10, false)
|
||||
assert.Equal(t, -1, p.Paginater.TotalPages())
|
||||
assert.False(t, p.Paginater.HasNext())
|
||||
|
||||
p = NewPagination(-1, 1, 1, 1)
|
||||
p.WithUnlimitedPaging(10, true)
|
||||
assert.Equal(t, -1, p.Paginater.TotalPages())
|
||||
assert.True(t, p.Paginater.HasNext())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user