forked from jshiffer/go-xmpp
Fix failing tests
This commit is contained in:
parent
3e94880916
commit
ce05c3226c
@ -274,6 +274,15 @@ func (s SenderMock) Send(packet stanza.Packet) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s SenderMock) SendIQ(ctx context.Context, iq stanza.IQ) (chan stanza.IQ, error) {
|
||||
out, err := xml.Marshal(iq)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
s.buffer.Write(out)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (s SenderMock) SendRaw(str string) error {
|
||||
s.buffer.WriteString(str)
|
||||
return nil
|
||||
|
@ -42,7 +42,7 @@ func TestGenerateIqId(t *testing.T) {
|
||||
}
|
||||
|
||||
iq = stanza.NewIQ(stanza.Attrs{})
|
||||
if iq.Id != "1" {
|
||||
if iq.Id == "" {
|
||||
t.Error("NewIQ did not generate an Id")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user