From 059a87a80227426f854256139bbbc7309bdb6fa0 Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 28 Apr 2025 16:51:56 -0600 Subject: feat: redirect to login page when session is established --- pkg/pls/random_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pkg/pls/random_test.go (limited to 'pkg/pls/random_test.go') diff --git a/pkg/pls/random_test.go b/pkg/pls/random_test.go new file mode 100644 index 0000000..56dfb2d --- /dev/null +++ b/pkg/pls/random_test.go @@ -0,0 +1,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)) + }) +} -- cgit v1.2.3