You've already forked img-proxy-url-generator
added tests
updated go version and packages
This commit is contained in:
16
generator/plain_test.go
Normal file
16
generator/plain_test.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package generator
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestGenerator_GenerateUrl(t *testing.T) {
|
||||
g, err := NewGenerator(Config{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
url, _ := g.generatePlainUrl("local:///test.png")
|
||||
|
||||
if url != "plain/local:///test.png" {
|
||||
t.Errorf("url is %s", url)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user