diff options
author | Kim Alvefur <zash@zash.se> | 2020-05-11 21:41:02 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-05-11 21:41:02 +0200 |
commit | 0cf5e523843ae039f2aa005995cd320d7fe2ff1f (patch) | |
tree | 2bb49ffdc316cabfa34ef945e0cd64cc3a11f02d /spec/core_storagemanager_spec.lua | |
parent | 1d34aa9296c22ac0e4dbcb2f352d38130d6a78f4 (diff) | |
download | prosody-0cf5e523843ae039f2aa005995cd320d7fe2ff1f.tar.gz prosody-0cf5e523843ae039f2aa005995cd320d7fe2ff1f.zip |
spec/storage: Reset build context of test stanza make comparisons easier
While building a stanza there's a .last_add field keeping track of where
in the XML tree tags are being added. This field does not survive a
roundtrip through preserialize / deserialize. :reset() removes this,
which simplifes comparisons after such a roundtrip.
Diffstat (limited to 'spec/core_storagemanager_spec.lua')
-rw-r--r-- | spec/core_storagemanager_spec.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/core_storagemanager_spec.lua b/spec/core_storagemanager_spec.lua index b228c5fd..29ab014f 100644 --- a/spec/core_storagemanager_spec.lua +++ b/spec/core_storagemanager_spec.lua @@ -206,7 +206,8 @@ describe("storagemanager", function () local test_stanza = st.stanza("test", { xmlns = "urn:example:foo" }) :tag("foo"):up() - :tag("foo"):up(); + :tag("foo"):up() + :reset(); local test_time = 1539204123; local test_data = { |