summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2019-11-03 22:21:30 +0100
committerlouiz’ <louiz@louiz.org>2019-11-06 17:22:38 +0100
commit7ca1b33ae39360ae7982bf862ace1f1088e11067 (patch)
tree72a4d7e3be7367cc068347d95594fc7549502c3c
parentcedf4412818fe15cdbd269a443c27d695106e69e (diff)
downloadbiboumi-7ca1b33ae39360ae7982bf862ace1f1088e11067.tar.gz
biboumi-7ca1b33ae39360ae7982bf862ace1f1088e11067.tar.bz2
biboumi-7ca1b33ae39360ae7982bf862ace1f1088e11067.tar.xz
biboumi-7ca1b33ae39360ae7982bf862ace1f1088e11067.zip
Add a test for MAM without an “end” value
-rw-r--r--tests/end_to_end/scenarios/mam_with_timestamps.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/end_to_end/scenarios/mam_with_timestamps.py b/tests/end_to_end/scenarios/mam_with_timestamps.py
index f8d1a06..0ed0333 100644
--- a/tests/end_to_end/scenarios/mam_with_timestamps.py
+++ b/tests/end_to_end/scenarios/mam_with_timestamps.py
@@ -40,4 +40,24 @@ scenario = (
expect_stanza("/iq[@type='result'][@id='id8'][@from='#foo%{irc_server_one}'][@to='{jid_one}/{resource_one}']",
"/iq/mam:fin[@complete='true']/rsm:set"),
+
+ # Try the same thing, but only with the 'start' value, omitting the end
+ send_stanza("""<iq from='{jid_one}/{resource_one}' id='id888' to='#foo%{irc_server_one}' type='set'>
+ <query queryid='qid17' xmlns='urn:xmpp:mam:2'>
+ <x type='submit' xmlns='jabber:x:data'>
+ <field type='hidden' var='FORM_TYPE' xmlns='jabber:x:data'><value xmlns='jabber:x:data'>urn:xmpp:mam:2</value></field>
+ <field var='start' xmlns='jabber:x:data'><value xmlns='jabber:x:data'>{first_timestamp}</value></field>
+ </x>
+ </query>
+ </iq>"""),
+
+ expect_stanza("/message/mam:result[@queryid='qid17']/forward:forwarded/delay:delay",
+ "/message/mam:result/forward:forwarded/client:message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/client:body[text()='coucou 3']"),
+
+ expect_stanza("/message/mam:result[@queryid='qid17']/forward:forwarded/delay:delay",
+ "/message/mam:result/forward:forwarded/client:message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/client:body[text()='coucou 4']"),
+
+ expect_stanza("/iq[@type='result'][@id='id888'][@from='#foo%{irc_server_one}'][@to='{jid_one}/{resource_one}']",
+ "/iq/mam:fin[@complete='true']/rsm:set"),
+
)