1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00
Files
mxpv-podsync/cmd/podsync/updater_test.go
2019-11-23 13:25:07 -08:00

27 lines
470 B
Go

package main
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/mxpv/podsync/pkg/config"
)
func TestUpdater_hostname(t *testing.T) {
u := Updater{
config: &config.Config{
Server: config.Server{
Hostname: "localhost",
Port: 7979,
},
},
}
assert.Equal(t, "http://localhost", u.hostname())
// Trim end slash
u.config.Server.Hostname = "https://localhost:8080/"
assert.Equal(t, "https://localhost:8080", u.hostname())
}