mirror of
https://github.com/luxfi/password.git
synced 2026-10-30 15:22:23 +00:00
21 lines
415 B
Go
21 lines
415 B
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package password
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestHash(t *testing.T) {
|
|
require := require.New(t)
|
|
|
|
h := Hash{}
|
|
require.NoError(h.Set("heytherepal"))
|
|
require.True(h.Check("heytherepal"))
|
|
require.False(h.Check("heytherepal!"))
|
|
require.False(h.Check(""))
|
|
}
|