aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/util_stanza_spec.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/util_stanza_spec.lua b/spec/util_stanza_spec.lua
index 3b9084fa..23cdbeb9 100644
--- a/spec/util_stanza_spec.lua
+++ b/spec/util_stanza_spec.lua
@@ -214,6 +214,12 @@ describe("util.stanza", function()
assert.are.equal(#r.tags, 1);
assert.are.equal(r.tags[1].tags[1].name, "service-unavailable");
end);
+
+ it("should reject not-stanzas", function ()
+ assert.has.error_match(function ()
+ st.error_reply(not "a stanza", "modify", "bad-request");
+ end, "expected stanza");
+ end);
end);
describe("should reject #invalid", function ()