mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-23 06:18:59 +00:00
b9966487f6
close #100 close #109 close #113 close #28 close #63 Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/106
14 lines
282 B
Go
14 lines
282 B
Go
package utils
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestTrimHostPort(t *testing.T) {
|
|
assert.EqualValues(t, "aa", TrimHostPort("aa"))
|
|
assert.EqualValues(t, "", TrimHostPort(":"))
|
|
assert.EqualValues(t, "example.com", TrimHostPort("example.com:80"))
|
|
}
|