aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-12-23 21:33:10 +0100
committerKim Alvefur <zash@zash.se>2019-12-23 21:33:10 +0100
commite0bcb4d7d43745ce677edabc1cebe6a53644723d (patch)
treecef286439c14badd2faf43869e92d1a9016ef3a9 /spec
parent248ec3f83401528152c3b34dd81e994563706fea (diff)
downloadprosody-e0bcb4d7d43745ce677edabc1cebe6a53644723d.tar.gz
prosody-e0bcb4d7d43745ce677edabc1cebe6a53644723d.zip
tests: Silence [luacheck] warnings
Diffstat (limited to 'spec')
-rw-r--r--spec/core_storagemanager_spec.lua6
-rw-r--r--spec/util_async_spec.lua2
-rw-r--r--spec/util_pubsub_spec.lua6
3 files changed, 14 insertions, 0 deletions
diff --git a/spec/core_storagemanager_spec.lua b/spec/core_storagemanager_spec.lua
index fd2f8742..c3534cd5 100644
--- a/spec/core_storagemanager_spec.lua
+++ b/spec/core_storagemanager_spec.lua
@@ -119,6 +119,7 @@ describe("storagemanager", function ()
describe("can be queried", function ()
it("for all items", function ()
+ -- luacheck: ignore 211/err
local data, err = archive:find("user", {});
assert.truthy(data);
local count = 0;
@@ -135,6 +136,7 @@ describe("storagemanager", function ()
end);
it("by JID", function ()
+ -- luacheck: ignore 211/err
local data, err = archive:find("user", {
with = "contact@example.com";
});
@@ -153,6 +155,7 @@ describe("storagemanager", function ()
end);
it("by time (end)", function ()
+ -- luacheck: ignore 211/err
local data, err = archive:find("user", {
["end"] = test_time;
});
@@ -171,6 +174,7 @@ describe("storagemanager", function ()
end);
it("by time (start)", function ()
+ -- luacheck: ignore 211/err
local data, err = archive:find("user", {
["start"] = test_time;
});
@@ -189,6 +193,7 @@ describe("storagemanager", function ()
end);
it("by time (start+end)", function ()
+ -- luacheck: ignore 211/err
local data, err = archive:find("user", {
["start"] = test_time;
["end"] = test_time+1;
@@ -239,6 +244,7 @@ describe("storagemanager", function ()
end);
it("can be purged", function ()
+ -- luacheck: ignore 211/err
local ok, err = archive:delete("user");
assert.truthy(ok);
local data, err = archive:find("user", {
diff --git a/spec/util_async_spec.lua b/spec/util_async_spec.lua
index d2de8c94..8123503b 100644
--- a/spec/util_async_spec.lua
+++ b/spec/util_async_spec.lua
@@ -544,6 +544,8 @@ describe("util.async", function()
assert.equal(r1.state, "ready");
end);
+ -- luacheck: ignore 211/rf
+ -- FIXME what's rf?
it("should support multiple done() calls", function ()
local processed_item;
local wait, done;
diff --git a/spec/util_pubsub_spec.lua b/spec/util_pubsub_spec.lua
index a48bd400..75f893e3 100644
--- a/spec/util_pubsub_spec.lua
+++ b/spec/util_pubsub_spec.lua
@@ -101,6 +101,7 @@ describe("util.pubsub", function ()
assert(service:publish("node", true, "1", "item 1", { myoption = true }));
local ok, config = assert(service:get_node_config("node", true));
+ assert.truthy(ok);
assert.equals(true, config.myoption);
end);
@@ -229,6 +230,7 @@ describe("util.pubsub", function ()
end);
it("should be the default", function ()
local ok, config = service:get_node_config("test", true);
+ assert.truthy(ok);
assert.equal("open", config.access_model);
end);
it("should allow anyone to subscribe", function ()
@@ -250,6 +252,7 @@ describe("util.pubsub", function ()
end);
it("should be present in the configuration", function ()
local ok, config = service:get_node_config("test", true);
+ assert.truthy(ok);
assert.equal("whitelist", config.access_model);
end);
it("should not allow anyone to subscribe", function ()
@@ -294,6 +297,7 @@ describe("util.pubsub", function ()
end);
it("should be the default", function ()
local ok, config = service:get_node_config("test", true);
+ assert.truthy(ok);
assert.equal("publishers", config.publish_model);
end);
it("should not allow anyone to publish", function ()
@@ -304,6 +308,7 @@ describe("util.pubsub", function ()
end);
it("should allow publishers to publish", function ()
assert(service:set_affiliation("test", true, "mypublisher", "publisher"));
+ -- luacheck: ignore 211/err
local ok, err = service:publish("test", "mypublisher", "item1", "foo");
assert.is_true(ok);
end);
@@ -342,6 +347,7 @@ describe("util.pubsub", function ()
end);
it("should allow publishers to publish without a subscription", function ()
assert(service:set_affiliation("test", true, "mypublisher", "publisher"));
+ -- luacheck: ignore 211/err
local ok, err = service:publish("test", "mypublisher", "item1", "foo");
assert.is_true(ok);
end);