aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-14 11:37:23 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-14 11:37:23 +0100
commit25f1c7c67f7e165803c887854b201b0240093475 (patch)
tree5d540abd0f116e8cea884ff6169469c599421534 /test
parentc2a0484005d2e574830fec4245cee1ea9cce82c9 (diff)
downloadrspamd-25f1c7c67f7e165803c887854b201b0240093475.tar.gz
rspamd-25f1c7c67f7e165803c887854b201b0240093475.zip
[Test] Fix unit tests
Diffstat (limited to 'test')
-rw-r--r--test/lua/rspamd_assertions.lua4
-rw-r--r--test/lua/unit/lua_util.extract_specific_urls.lua4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/lua/rspamd_assertions.lua b/test/lua/rspamd_assertions.lua
index 72e79c4d4..8e483431d 100644
--- a/test/lua/rspamd_assertions.lua
+++ b/test/lua/rspamd_assertions.lua
@@ -20,8 +20,8 @@ end
local function rspamd_assert_table_equals_sorted(tbl)
local expect = util.deepcopy(tbl.expect)
local actual = util.deepcopy(tbl.actual)
- table.sort(expect)
- table.sort(actual)
+ util.deepsort(expect)
+ util.deepsort(actual)
return util.table_cmp(expect, actual)
end
diff --git a/test/lua/unit/lua_util.extract_specific_urls.lua b/test/lua/unit/lua_util.extract_specific_urls.lua
index 71c83e35c..b1a9b07d2 100644
--- a/test/lua/unit/lua_util.extract_specific_urls.lua
+++ b/test/lua/unit/lua_util.extract_specific_urls.lua
@@ -108,8 +108,8 @@ context("Lua util - extract_specific_urls plain", function()
local cases = {
{expect = url_list, filter = nil, limit = 9999, need_emails = true, prefix = 'p'},
{expect = {}, filter = (function() return false end), limit = 9999, need_emails = true, prefix = 'p'},
- {expect = {"tesco.co.net", "test.com"}, filter = nil, limit = 2, need_emails = true, prefix = 'p'},
- {expect = {"tesco.co.net", "test.com", "meet.org"}, filter = nil, limit = 3, need_emails = true, prefix = 'p'},
+ {expect = {"domain4.co.net", "test.com"}, filter = nil, limit = 2, need_emails = true, prefix = 'p'},
+ {expect = {"domain4.co.net", "test.com", "domain3.org"}, filter = nil, limit = 3, need_emails = true, prefix = 'p'},
{
expect = {"gov.co.net", "tesco.co.net", "domain1.co.net", "domain2.co.net", "domain3.co.net", "domain4.co.net"},
filter = (function(s) return s:get_host():sub(-4) == ".net" end),