xmpp_test.go
changeset 114 a058e33c1666
parent 98 c9cc4eda6dce
--- a/xmpp_test.go	Sun Dec 16 23:06:54 2012 -0700
+++ b/xmpp_test.go	Fri Dec 28 17:07:20 2012 -0700
@@ -81,14 +81,14 @@
 func TestWriteError(t *testing.T) {
 	se := &streamError{Any: Generic{XMLName: xml.Name{Local: "blah"}}}
 	str := testWrite(se)
-	exp := `<stream:error><blah></blah></stream:error>`
+	exp := `<error xmlns="` + NsStream + `"><blah></blah></error>`
 	assertEquals(t, exp, str)
 
 	se = &streamError{Any: Generic{XMLName: xml.Name{Space: NsStreams, Local: "foo"}}, Text: &errText{Lang: "ru", Text: "Пошёл ты"}}
 	str = testWrite(se)
-	exp = `<stream:error><foo xmlns="` + NsStreams +
+	exp = `<error xmlns="` + NsStream + `"><foo xmlns="` + NsStreams +
 		`"></foo><text xmlns="` + NsStreams +
-		`" xml:lang="ru">Пошёл ты</text></stream:error>`
+		`" xml:lang="ru">Пошёл ты</text></error>`
 	assertEquals(t, exp, str)
 }