xmpp_test.go
changeset 34 7b1f924c75e2
parent 31 1dc47df5c99f
child 36 9fe022261dcc
--- a/xmpp_test.go	Fri Dec 30 17:16:37 2011 -0700
+++ b/xmpp_test.go	Fri Dec 30 17:27:14 2011 -0700
@@ -29,7 +29,7 @@
 	}
 
 	r = strings.NewReader(`<stream:error><bad-foo/>` +
-		`<text xml:lang="en" xmlns="` + nsStreams +
+		`<text xml:lang="en" xmlns="` + NsStreams +
 		`">Error text</text></stream:error>`)
 	ch = make(chan interface{})
 	go readXml(r, ch)
@@ -47,7 +47,7 @@
 func TestReadStream(t *testing.T) {
 	r := strings.NewReader(`<stream:stream to="foo.com" ` +
 		`from="bar.org" id="42"` +
-		`xmlns="jabber:client" xmlns:stream="` + nsStream +
+		`xmlns="jabber:client" xmlns:stream="` + NsStream +
 		`" version="1.0">`)
 	ch := make(chan interface{})
 	go readXml(r, ch)
@@ -85,11 +85,11 @@
 	assertEquals(t, exp, str)
 
 	se = &streamError{Any: Generic{XMLName: xml.Name{Space:
-				nsStreams, Local: "foo"}}, Text:
+				NsStreams, Local: "foo"}}, Text:
 		&errText{Lang: "ru", Text: "Пошёл ты"}}
 	str = testWrite(se)
-	exp = `<stream:error><foo xmlns="` + nsStreams +
-		`"></foo><text xmlns="` + nsStreams +
+	exp = `<stream:error><foo xmlns="` + NsStreams +
+		`"></foo><text xmlns="` + NsStreams +
 		`" xml:lang="ru">Пошёл ты</text></stream:error>`
 	assertEquals(t, exp, str)
 }
@@ -99,7 +99,7 @@
 		"en", Version: "1.0"}
 	str := testWrite(ss)
 	exp := `<stream:stream xmlns="jabber:client"` +
-		` xmlns:stream="` + nsStream + `" to="foo.org"` +
+		` xmlns:stream="` + NsStream + `" to="foo.org"` +
 		` from="bar.com" id="42" xml:lang="en" version="1.0">`
 	assertEquals(t, exp, str)
 }