xmpp/sasl_test.go
author Chris Jones <chris@cjones.org>
Sat, 09 Nov 2013 12:09:37 -0700
changeset 178 ccfebbd9f49b
parent 143 62166e57800e
permissions -rw-r--r--
Changed the JID type to be an alias of string, rather than a struct. This allows it to be used as a key in a map, among other benefits.

package xmpp

import (
	"testing"
)

func TestSaslDigest(t *testing.T) {
	// These values are from RFC2831, section 4.
	obs := saslDigestResponse("chris", "elwood.innosoft.com",
		"secret", "OA6MG9tEQGm2hh", "OA6MHXh6VqTrRk",
		"AUTHENTICATE", "imap/elwood.innosoft.com",
		"00000001")
	exp := "d388dad90d4bbd760a152321f2143af7"
	assertEquals(t, exp, obs)
}