aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/lua
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2019-01-16 15:07:34 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2019-01-17 11:32:00 +0300
commite481f8514ade0e8a3a5750c22c1fda9cffaea3fe (patch)
tree3c91e065fc9f6fb14b5b07e9650dbe66209b5f8c /test/functional/lua
parentae8f1997198be36340efb8a1d291e0339b1486c3 (diff)
downloadrspamd-e481f8514ade0e8a3a5750c22c1fda9cffaea3fe.tar.gz
rspamd-e481f8514ade0e8a3a5750c22c1fda9cffaea3fe.zip
[Test] Add task:get_from(['mime']) test
Diffstat (limited to 'test/functional/lua')
-rw-r--r--test/functional/lua/get_from.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/lua/get_from.lua b/test/functional/lua/get_from.lua
new file mode 100644
index 000000000..4e3267b41
--- /dev/null
+++ b/test/functional/lua/get_from.lua
@@ -0,0 +1,8 @@
+rspamd_config:register_symbol({
+ name = 'SIMPLE_TEST',
+ score = 1.0,
+ callback = function(task)
+ local a = task:get_from('mime')[1]
+ task:insert_result('GET_FROM', 0.0, a.name .. ',' .. a.addr .. ',' .. a.user .. ',' .. a.domain)
+ end
+})