pgweb/pkg/api/helpers_test.go

20 lines
367 B
Go
Raw Normal View History

package api
import (
"github.com/stretchr/testify/assert"
"testing"
)
func Test_desanitize64(t *testing.T) {
examples := map[string]string{
"test": "test",
"test+test+": "test-test-",
"test/test/": "test_test_",
"test=test==": "test.test..",
}
for expected, example := range examples {
assert.Equal(t, expected, desanitize64(example))
}
}