tests/test_util_stanza.lua
author Matthew Wild <mwild1@gmail.com>
Fri, 09 Jan 2009 17:36:28 +0000
changeset 681 686b73503ce8
child 682 dedd19e9d4b3
permissions -rw-r--r--
Add test for previous commit
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
681
686b73503ce8 Add test for previous commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     1
686b73503ce8 Add test for previous commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     2
function deserialize(deserialize, st)
686b73503ce8 Add test for previous commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     3
	local stanza = st.stanza("message", { a = "a" });
686b73503ce8 Add test for previous commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     4
	
686b73503ce8 Add test for previous commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     5
	local stanza2 = deserialize(st.preserialize(stanza));
686b73503ce8 Add test for previous commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     6
	assert_is(stanza2.last_add, "Deserialized stanza is missing last_add for adding child tags");
686b73503ce8 Add test for previous commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
     7
end