forked from jshiffer/go-xmpp
Refactor tests
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// Check that we can detect optional session from advertised stream features
|
||||
func TestSessionFeatures(t *testing.T) {
|
||||
streamFeatures := stanza.StreamFeatures{Session: stanza.StreamSession{Optional: true}}
|
||||
streamFeatures := stanza.StreamFeatures{Session: stanza.StreamSession{Optional: &struct{}{}}}
|
||||
|
||||
data, err := xml.Marshal(streamFeatures)
|
||||
if err != nil {
|
||||
@@ -32,7 +32,7 @@ func TestSessionIQ(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("failed to create IQ: %v", err)
|
||||
}
|
||||
iq.Payload = &stanza.StreamSession{XMLName: xml.Name{Local: "session"}, Optional: true}
|
||||
iq.Payload = &stanza.StreamSession{XMLName: xml.Name{Local: "session"}, Optional: &struct{}{}}
|
||||
|
||||
data, err := xml.Marshal(iq)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user