added tests

updated go version and packages
This commit is contained in:
2024-05-07 14:14:28 -04:00
parent 889ba3cb48
commit a834bc6384
7 changed files with 144 additions and 9 deletions

21
generator/base64_test.go Normal file
View File

@@ -0,0 +1,21 @@
package generator
import (
"testing"
)
func TestGenerator_GenerateBase64(t *testing.T) {
g, err := NewGenerator(Config{})
if err != nil {
t.Fatal(err)
}
url, err := g.generateBase64Url([]byte("test://file"))
if err != nil {
return
}
if url != "dGVzdDovL2ZpbGU" {
t.Errorf("url is wrong: %s", url)
}
}