stream_test.go
author Chris Jones <chris@cjones.org>
Sat, 31 Dec 2011 10:11:01 -0700
changeset 37 fbda8e925fdf
parent 11 48be1ae93fd4
permissions -rw-r--r--
Minor fixups to make this come closer to working. It doesn't actually work, though, because the nesting in XML is backwards from how it is in Go. <iq><query/></iq> vs. RosterIq { Iq }

// Copyright 2011 The Go Authors.  All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

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)
}