unit test for server.Address() function
This commit is contained in:
parent
be76330103
commit
5c195efcf5
1 changed files with 6 additions and 0 deletions
|
@ -243,6 +243,12 @@ func TestListenAndServe(t *testing.T) {
|
|||
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
if server.Address().String() != addr {
|
||||
t.Errorf("server is listening on `%s` instead of `%s",
|
||||
server.Address(), addr,
|
||||
)
|
||||
}
|
||||
|
||||
c, err := smtp.Dial(addr)
|
||||
if err != nil {
|
||||
t.Fatalf("Dial failed: %v", err)
|
||||
|
|
Loading…
Add table
Reference in a new issue