mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
17
pkg/rnd/bytes_test.go
Normal file
17
pkg/rnd/bytes_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package rnd
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestRandomBytes(t *testing.T) {
|
||||
for n := 0; n <= 64; n++ {
|
||||
if result, err := RandomBytes(n); err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
assert.Len(t, result, n)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user