bine/control/controltest/cmd_protocolinfo_test.go

16 lines
337 B
Go
Raw Normal View History

2018-05-10 21:29:16 +00:00
package controltest
import (
"strings"
"testing"
)
func TestProtocolInfo(t *testing.T) {
2018-05-10 23:05:43 +00:00
ctx, conn := NewTestContextConnected(t)
defer ctx.CloseConnected(conn)
info, err := conn.ProtocolInfo()
2018-05-10 21:29:16 +00:00
ctx.Require.NoError(err)
ctx.Require.Contains(info.AuthMethods, "NULL")
ctx.Require.True(strings.HasPrefix(info.TorVersion, "0.3"))
}