mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-21 10:02:00 -08:00
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