Issue #3: Add close method

This commit is contained in:
Ola Holmström
2015-09-02 21:40:26 +02:00
parent 391be842a9
commit ff425ac175
6 changed files with 46 additions and 4 deletions
+15
View File
@@ -325,3 +325,18 @@ func TestBroadcastFilter(t *testing.T) {
t.Errorf("should not be false")
}
}
func TestStop(t *testing.T) {
noecho := NewTestServer()
server := httptest.NewServer(noecho)
defer server.Close()
conn, err := NewDialer(server.URL)
defer conn.Close()
if err != nil {
t.Error(err)
}
noecho.m.Close()
}