mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-02-12 16:12:44 +00:00
18 lines
441 B
Go
18 lines
441 B
Go
package random
|
|
|
|
import "testing"
|
|
|
|
func TestGenerateRandomLowerUpperAndNumeric(t *testing.T) {
|
|
t.Run("should generate a random password of expected length", func(t *testing.T) {
|
|
length := 10
|
|
password, err := GenerateRandomURLBase64Encoded(length)
|
|
if err != nil {
|
|
t.Errorf("expected no error, got %v", err)
|
|
}
|
|
if len(password) != length {
|
|
t.Errorf("expected password length to be %d, got %d", length, len(password))
|
|
}
|
|
})
|
|
|
|
}
|