mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-23 00:21:53 +02:00
fixed issues for testing
This commit is contained in:
@@ -114,6 +114,13 @@ func TestFileSize(t *testing.T) {
|
||||
assert.Equal(t, "2.0 EiB", FileSize(size))
|
||||
}
|
||||
|
||||
func TestGetFileSize(t *testing.T) {
|
||||
var size int64 = 512 * 1024 * 1024 * 1024
|
||||
s, err := GetFileSize("512 GiB")
|
||||
assert.Equal(t, s, size)
|
||||
assert.Equal(t, err, nil)
|
||||
}
|
||||
|
||||
func TestEllipsisString(t *testing.T) {
|
||||
assert.Equal(t, "...", EllipsisString("foobar", 0))
|
||||
assert.Equal(t, "...", EllipsisString("foobar", 1))
|
||||
|
||||
Reference in New Issue
Block a user