aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_stanza_spec.lua
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
commit84440f2e91632d32c5484165547b4c3495fca2c0 (patch)
treeb7dd1f7b94bc4a621e3f8785701731acdf5aa017 /spec/util_stanza_spec.lua
parent4b9b245dc0ec77a2ee8ca99e5a6ec88e301703a6 (diff)
parent320392f1d11e27b89f8ce0556812465c1bf1ed40 (diff)
downloadprosody-84440f2e91632d32c5484165547b4c3495fca2c0.tar.gz
prosody-84440f2e91632d32c5484165547b4c3495fca2c0.zip
Merge 0.11->trunk
Diffstat (limited to 'spec/util_stanza_spec.lua')
-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);