spec/util_stanza_spec.lua
branch0.11
changeset 9634 bff66c3faceb
parent 9311 21c2f3331c59
child 9677 e7e75b091c96
equal deleted inserted replaced
9632:2fcf517b811e 9634:bff66c3faceb
   344 			assert.has_error_match(function ()
   344 			assert.has_error_match(function ()
   345 				s:maptags(function () end);
   345 				s:maptags(function () end);
   346 			end, "Invalid stanza");
   346 			end, "Invalid stanza");
   347 		end);
   347 		end);
   348 	end);
   348 	end);
       
   349 
       
   350 	describe("#clone", function ()
       
   351 		it("works", function ()
       
   352 			local s = st.message({type="chat"}, "Hello"):reset();
       
   353 			local c = st.clone(s);
       
   354 			assert.same(s, c);
       
   355 		end);
       
   356 
       
   357 		it("works", function ()
       
   358 			assert.has_error(function ()
       
   359 				st.clone("this is not a stanza");
       
   360 			end);
       
   361 		end);
       
   362 	end);
   349 end);
   363 end);