Add TestWebConfig_SocketAddress
This commit is contained in:
parent
1b23b0dd1d
commit
76d45d7eb8
13
config/web_test.go
Normal file
13
config/web_test.go
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package config
|
||||||
|
|
||||||
|
import "testing"
|
||||||
|
|
||||||
|
func TestWebConfig_SocketAddress(t *testing.T) {
|
||||||
|
web := &webConfig{
|
||||||
|
Address: "0.0.0.0",
|
||||||
|
Port: 8081,
|
||||||
|
}
|
||||||
|
if web.SocketAddress() != "0.0.0.0:8081" {
|
||||||
|
t.Errorf("expected %s, got %s", "0.0.0.0:8081", web.SocketAddress())
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user