mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-26 02:09:47 +08:00
16 lines
274 B
Go
16 lines
274 B
Go
|
package httpserver
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestAddress(t *testing.T) {
|
||
|
addr := "127.0.0.1:9005"
|
||
|
srv := &Server{Server: &http.Server{Addr: addr}}
|
||
|
|
||
|
if got, want := srv.Address(), addr; got != want {
|
||
|
t.Errorf("Expected '%s' but got '%s'", want, got)
|
||
|
}
|
||
|
}
|