structs_test.go
changeset 111 36287f2cf06e
parent 110 7696e6a01709
child 114 a058e33c1666
equal deleted inserted replaced
110:7696e6a01709 111:36287f2cf06e
    87 		`" xml:lang="pt">things happen</text></stream:error>`
    87 		`" xml:lang="pt">things happen</text></stream:error>`
    88 	assertMarshal(t, exp, e)
    88 	assertMarshal(t, exp, e)
    89 }
    89 }
    90 
    90 
    91 func TestIqMarshal(t *testing.T) {
    91 func TestIqMarshal(t *testing.T) {
    92 	iq := &Iq{Stanza: Stanza{Type: "set", Id: "3",
    92 	iq := &Iq{Header: Header{Type: "set", Id: "3",
    93 		Nested: []interface{}{Generic{XMLName: xml.Name{Space: NsBind,
    93 		Nested: []interface{}{Generic{XMLName: xml.Name{Space: NsBind,
    94 			Local: "bind"}}}}}
    94 			Local: "bind"}}}}}
    95 	exp := `<iq id="3" type="set"><bind xmlns="` + NsBind +
    95 	exp := `<iq id="3" type="set"><bind xmlns="` + NsBind +
    96 		`"></bind></iq>`
    96 		`"></bind></iq>`
    97 	assertMarshal(t, exp, iq)
    97 	assertMarshal(t, exp, iq)