mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-18 10:29:43 +00:00
b9966487f6
close #100 close #109 close #113 close #28 close #63 Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/106
13 lines
282 B
Go
13 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"))
|
|
}
|