~samwhited/xmpp

ref: 008072a4511547af0c1f3b8f7d1c55bc3bd94291 xmpp/dial_test.go -rw-r--r-- 442 bytes
008072a4Sam Whited Update SASL to use new mellium.im/sasl API 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2016 Sam Whited.
// Use of this source code is governed by the BSD 2-clause license that can be
// found in the LICENSE file.

package xmpp

import (
	"testing"

	"mellium.im/xmpp/jid"
)

func TestDialClientPanicsIfNilContext(t *testing.T) {
	defer func() {
		if r := recover(); r == nil {
			t.Error("Expected Dial to panic when passed a nil context.")
		}
	}()
	DialClient(nil, "tcp", jid.MustParse("feste@shakespeare.lit"))
}