diff options
Diffstat (limited to 'test/functional/tests.bats')
-rw-r--r-- | test/functional/tests.bats | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/tests.bats b/test/functional/tests.bats index 387c7c260..804c54a0e 100644 --- a/test/functional/tests.bats +++ b/test/functional/tests.bats @@ -94,6 +94,28 @@ RSPAMC="$BATS_TEST_DIRNAME/../../src/client/rspamc" clear_stats } +@test "Test learn message with an empty part" { + clear_stats + export RSPAMD_CONFIG="$BATS_TEST_DIRNAME/configs/stats.conf" + run_rspamd + run ${RSPAMC} -h localhost:56790 \ + --key y3ms1knmetxf8gdeixkf74b6tbpxqugmxzqksnjodiqei7tksyty \ + learn_spam \ + "$BATS_TEST_DIRNAME/messages/empty_part.eml" + [ "$status" -eq 0 ] + + echo $output | egrep 'success.*true' + + run ${RSPAMC} -h localhost:56789 \ + --key y3ms1knmetxf8gdeixkf74b6tbpxqugmxzqksnjodiqei7tksyty \ + symbols \ + "$BATS_TEST_DIRNAME/messages/empty_part.eml" + [ "$status" -eq 0 ] + + echo $output | grep 'BAYES_SPAM' + clear_stats +} + @test "Test rspamd dependencies" { clear_stats sed -e 's|@@LUA_SCRIPT@@|${CURDIR}/functional/cases/deps.lua|' < \ |