2020-01-31 10:48:03 +00:00
|
|
|
package stanza_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"gosrc.io/xmpp/stanza"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Limiting the number of items
|
|
|
|
func TestNewResultSetReq(t *testing.T) {
|
2020-01-31 11:06:53 +00:00
|
|
|
expectedRq := "<iq id=\"q29302\" type=\"set\"> <query xmlns=\"urn:xmpp:mam:2\"> " +
|
|
|
|
"<x type=\"submit\" xmlns=\"jabber:x:data\"> <field type=\"hidden\" var=\"FORM_TYPE\"> " +
|
|
|
|
"<value>urn:xmpp:mam:2</value> </field> <field var=\"start\"> <value>2010-08-07T00:00:00Z</value> </field> </x> " +
|
|
|
|
"<set xmlns=\"http://jabber.org/protocol/rsm\"> <max>10</max> </set> </query> </iq>"
|
2020-01-31 10:48:03 +00:00
|
|
|
|
|
|
|
maxVal := 10
|
|
|
|
rs := &stanza.ResultSet{
|
|
|
|
Max: &maxVal,
|
|
|
|
}
|
|
|
|
|
2020-01-31 11:06:53 +00:00
|
|
|
// TODO when Mam is implemented
|
|
|
|
_ = expectedRq
|
|
|
|
_ = rs
|
2020-01-31 10:48:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func TestUnmarshalResultSeqReq(t *testing.T) {
|
2020-01-31 11:06:53 +00:00
|
|
|
// TODO when Mam is implemented
|
2020-01-31 10:48:03 +00:00
|
|
|
|
|
|
|
}
|