aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_datamapper_spec.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-03-07 01:41:39 +0100
committerKim Alvefur <zash@zash.se>2021-03-07 01:41:39 +0100
commit7cd2803161ee05303371cd681f8ae00a0838d07f (patch)
treec9c4cce37f9470109870f19cbc5c93c7db3674cf /spec/util_datamapper_spec.lua
parentd20ea9b87e6e4071aca1a6895041d9e82ebb8691 (diff)
downloadprosody-7cd2803161ee05303371cd681f8ae00a0838d07f.tar.gz
prosody-7cd2803161ee05303371cd681f8ae00a0838d07f.zip
util.datamapper: Add logic for "boolean" tags here the presence means true
Diffstat (limited to 'spec/util_datamapper_spec.lua')
-rw-r--r--spec/util_datamapper_spec.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/util_datamapper_spec.lua b/spec/util_datamapper_spec.lua
index 2a149b1c..7f6ef75e 100644
--- a/spec/util_datamapper_spec.lua
+++ b/spec/util_datamapper_spec.lua
@@ -31,6 +31,10 @@ describe("util.datampper", function()
type = "string";
xml = {x_name_is_value = true; namespace = "http://jabber.org/protocol/chatstates"};
};
+ fallback = {
+ type = "boolean";
+ xml = {x_name_is_value = true; name = "fallback"; namespace = "urn:xmpp:fallback:0"};
+ };
};
};
@@ -39,6 +43,7 @@ describe("util.datampper", function()
<body>Hello</body>
<delay xmlns='urn:xmpp:delay' from='test' stamp='2021-03-07T15:59:08+00:00'>Becasue</delay>
<active xmlns='http://jabber.org/protocol/chatstates'/>
+ <fallback xmlns='urn:xmpp:fallback:0'/>
</message>
]];
@@ -51,6 +56,7 @@ describe("util.datampper", function()
body = "Hello";
delay = {from = "test"; stamp = "2021-03-07T15:59:08+00:00"; reason = "Becasue"};
state = "active";
+ fallback = true;
};
end);