Skip to content
Snippets Groups Projects
Commit 6f8189a3 authored by Tigran Avakyan's avatar Tigran Avakyan
Browse files

Uncommenting TestLogout

parent b8e8905a
No related branches found
No related tags found
No related merge requests found
......@@ -196,20 +196,20 @@ func TestSend(t *testing.T) {
t.Errorf("Error sending message: %v", err)
}
}
//
//func TestLogout(t *testing.T) {
// gwShutDown := gateway.StartGateway(gwAddress,
// gateway.NewImplementation(), "", "")
// time.Sleep(100 * time.Millisecond)
// defer gwShutDown()
//
// err := Logout()
// if err != nil {
// t.Errorf("Logout failed: %v", err)
// }
// err = Logout()
// if err == nil {
// t.Errorf("Logout did not throw an error when called on a client that" +
// " is not currently logged in.")
// }
//}
func TestLogout(t *testing.T) {
gwShutDown := gateway.StartGateway(gwAddress,
gateway.NewImplementation(), "", "")
time.Sleep(100 * time.Millisecond)
defer gwShutDown()
err := Logout()
if err != nil {
t.Errorf("Logout failed: %v", err)
}
err = Logout()
if err == nil {
t.Errorf("Logout did not throw an error when called on a client that" +
" is not currently logged in.")
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment