mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-15 11:52:12 +03:00
20 lines
367 B
Go
20 lines
367 B
Go
|
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))
|
||
|
}
|
||
|
}
|