mirror of
https://github.com/taigrr/pastebin
synced 2026-04-17 00:44:58 -07:00
fix: improve error handling, remove any type, add edge case protections
This commit is contained in:
@@ -23,6 +23,11 @@ func TestRandomStringUniqueness(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRandomStringZeroLength(t *testing.T) {
|
||||
assert.Equal(t, "", RandomString(0))
|
||||
assert.Equal(t, "", RandomString(-1))
|
||||
}
|
||||
|
||||
func TestRandomStringURLSafe(t *testing.T) {
|
||||
for range 50 {
|
||||
result := RandomString(32)
|
||||
|
||||
Reference in New Issue
Block a user