aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-10-01 19:43:20 +0100
committerMatthew Wild <mwild1@gmail.com>2018-10-01 19:43:20 +0100
commit56e97dc5d6ae00526ee81c24139680c50c0834d0 (patch)
treee4ddb80d1eec5e8f8a85824c4859c523e4eb4512 /spec
parent28522988cc6efe2c428b7c8aa9588743e4ce5ca5 (diff)
downloadprosody-56e97dc5d6ae00526ee81c24139680c50c0834d0.tar.gz
prosody-56e97dc5d6ae00526ee81c24139680c50c0834d0.zip
util.pubsub tests: Ensure necessary tests run in the defined order
Diffstat (limited to 'spec')
-rw-r--r--spec/util_pubsub_spec.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/util_pubsub_spec.lua b/spec/util_pubsub_spec.lua
index 3f463ef2..ec6cecf8 100644
--- a/spec/util_pubsub_spec.lua
+++ b/spec/util_pubsub_spec.lua
@@ -15,10 +15,13 @@ end);
describe("util.pubsub", function ()
describe("simple node creation and deletion", function ()
+ randomize(false); -- These tests are ordered
+
-- Roughly a port of scansion/scripts/pubsub_createdelete.scs
local service = pubsub.new();
describe("#create", function ()
+ randomize(false); -- These tests are ordered
it("creates a new node", function ()
assert.truthy(service:create("princely_musings", true));
end);
@@ -29,6 +32,7 @@ describe("util.pubsub", function ()
end);
describe("#delete", function ()
+ randomize(false); -- These tests are ordered
it("deletes the node", function ()
assert.truthy(service:delete("princely_musings", true));
end);
@@ -40,6 +44,8 @@ describe("util.pubsub", function ()
end);
describe("simple publishing", function ()
+ randomize(false); -- These tests are ordered
+
local notified;
local broadcaster = spy.new(function (notif_type, node_name, subscribers, item) -- luacheck: ignore 212
notified = subscribers;
@@ -82,6 +88,8 @@ describe("util.pubsub", function ()
end);
describe("#issue1082", function ()
+ randomize(false); -- These tests are ordered
+
local service = pubsub.new();
it("creates a node with max_items = 1", function ()