roster_test.go
changeset 39 4a06f7ccfa84
parent 38 2839fece923e
child 42 f6bb47ca12f2
equal deleted inserted replaced
38:2839fece923e 39:4a06f7ccfa84
    12 )
    12 )
    13 
    13 
    14 // This is mostly just tests of the roster data structures.
    14 // This is mostly just tests of the roster data structures.
    15 
    15 
    16 func TestRosterIqMarshal(t *testing.T) {
    16 func TestRosterIqMarshal(t *testing.T) {
    17 	iq := &Iq{From: "from", Lang: "en", Nested:
    17 	iq := &Iq{From: "from", Lang: "en", Nested: RosterQuery{}}
    18 		RosterQuery{XMLName: xml.Name{Space: NsRoster, Local:
       
    19 				"query"}, Item: []RosterItem{}}}
       
    20 	exp := `<iq from="from" xml:lang="en"><query xmlns="` +
    18 	exp := `<iq from="from" xml:lang="en"><query xmlns="` +
    21 		NsRoster + `"></query></iq>`
    19 		NsRoster + `"></query></iq>`
    22 	assertMarshal(t, exp, iq)
    20 	assertMarshal(t, exp, iq)
    23 }
    21 }
    24 
    22