blob: 56dfb2dfac2784e0d1147a6c286d382835064896 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package pls
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestGenerateRandomHex(t *testing.T) {
t.Run("returns a random nonce each time", func(t *testing.T) {
item := GenerateRandomHex(32)
require.NotEmpty(t, item)
assert.NotEqual(t, item, GenerateRandomHex(32))
})
}
|