Fix test to use lua_shape's :check() method instead of calling
schema as function (tableshape API).
Change:
- assert_true(schema(ucl_object))
+ local ok, err = schema:check(ucl_object)
+ assert_true(ok, err)
lua_shape schemas cannot be called as functions like tableshape.
They provide :check() and :transform() methods instead.
local expected = parser:get_object()
local ucl_object = lua_mime.message_to_ucl(task, true)
local schema = lua_mime.message_to_ucl_schema()
- assert_true(schema(ucl_object))
+ local ok, err = schema:check(ucl_object)
+ assert_true(ok, err)
assert_rspamd_table_eq({
actual = ucl_object,
expect = expected