Comparison

spec/util_stanza_spec.lua @ 10443:f28718f46196

util.stanza: Remove redundant check for attrs A stanza can't not have attrs if created the correct way
author Kim Alvefur <zash@zash.se>
date Mon, 25 Nov 2019 20:46:55 +0100
parent 10442:22db763c510c
child 10444:4eab1f5a4f3b
comparison
equal deleted inserted replaced
10442:22db763c510c 10443:f28718f46196
174 it("should reject not-stanzas", function () 174 it("should reject not-stanzas", function ()
175 assert.has.error_match(function () 175 assert.has.error_match(function ()
176 st.reply(not "a stanza"); 176 st.reply(not "a stanza");
177 end, "expected stanza"); 177 end, "expected stanza");
178 end); 178 end);
179
180 it("should reject not-stanzas", function ()
181 assert.has.error_match(function ()
182 st.reply({name="x"});
183 end, "expected stanza");
184 end);
185
179 end); 186 end);
180 187
181 describe("#error_reply()", function() 188 describe("#error_reply()", function()
182 it("should work for <s>", function() 189 it("should work for <s>", function()
183 -- Test stanza 190 -- Test stanza