aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-11-17 15:48:32 +0100
committerKim Alvefur <zash@zash.se>2018-11-17 15:48:32 +0100
commit5a4eaa0af27be5d07436fda04b5b4e519990b2cd (patch)
treeb7dd1f7b94bc4a621e3f8785701731acdf5aa017 /spec
parent7852a9791676ab5d32d40b32abc710f3a7bbab17 (diff)
parent3d3e0fa0826c0d107a7b99d875190ba4421f668a (diff)
downloadprosody-5a4eaa0af27be5d07436fda04b5b4e519990b2cd.tar.gz
prosody-5a4eaa0af27be5d07436fda04b5b4e519990b2cd.zip
Merge 0.11->trunk
Diffstat (limited to 'spec')
-rw-r--r--spec/util_stanza_spec.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/util_stanza_spec.lua b/spec/util_stanza_spec.lua
index 7eaadfe6..7fe836c7 100644
--- a/spec/util_stanza_spec.lua
+++ b/spec/util_stanza_spec.lua
@@ -346,4 +346,18 @@ describe("util.stanza", function()
end, "Invalid stanza");
end);
end);
+
+ describe("#clone", function ()
+ it("works", function ()
+ local s = st.message({type="chat"}, "Hello"):reset();
+ local c = st.clone(s);
+ assert.same(s, c);
+ end);
+
+ it("works", function ()
+ assert.has_error(function ()
+ st.clone("this is not a stanza");
+ end);
+ end);
+ end);
end);