1
0
Fork 0
hscloud/cluster/identd/ident/request_test.go

15 lines
320 B
Go

package ident
import "testing"
// TestRequestEncode exercises the (simple) functionality of Reequest.encode.
func TestRequestEncode(t *testing.T) {
r := Request{
ClientPort: 123,
ServerPort: 234,
}
if want, got := "234,123\r\n", string(r.encode()); want != got {
t.Errorf("Wanted %q, got %q", want, got)
}
}