mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-01-07 09:09:21 -08:00
Add builder & test on software version helpers
This commit is contained in:
committed by
Mickaël Rémond
parent
014957e029
commit
61adf7e414
@@ -14,7 +14,7 @@ func TestDiscoInfo_Builder(t *testing.T) {
|
||||
disco.AddIdentity("Test Component", "gateway", "service")
|
||||
disco.AddFeatures(stanza.NSDiscoInfo, stanza.NSDiscoItems, "jabber:iq:version", "urn:xmpp:delegation:1")
|
||||
|
||||
parsedIQ, err := marshallUnmarshall(t, iq)
|
||||
parsedIQ, err := checkMarshalling(t, iq)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -57,7 +57,7 @@ func TestDiscoItems_Builder(t *testing.T) {
|
||||
AddItem("catalog.shakespeare.lit", "clothing", "Wear your literary taste with pride").
|
||||
AddItem("catalog.shakespeare.lit", "music", "Music from the time of Shakespeare")
|
||||
|
||||
parsedIQ, err := marshallUnmarshall(t, iq)
|
||||
parsedIQ, err := checkMarshalling(t, iq)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -79,6 +79,12 @@ func TestDiscoItems_Builder(t *testing.T) {
|
||||
if item.JID != items[i].JID {
|
||||
t.Errorf("JID Mismatch (expected: %s): %s", items[i].JID, item.JID)
|
||||
}
|
||||
if item.Node != items[i].Node {
|
||||
t.Errorf("Node Mismatch (expected: %s): %s", items[i].JID, item.JID)
|
||||
}
|
||||
if item.Name != items[i].Name {
|
||||
t.Errorf("Name Mismatch (expected: %s): %s", items[i].JID, item.JID)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user