feat: use vacation subject prefix
This commit is contained in:
@@ -11,8 +11,6 @@ test('settings validate defaults and external paths', function (): void {
|
||||
'DEFAULT_ENABLE=false',
|
||||
'GLOBAL_AUTORESPONDER_TIMEZONE=Europe/Warsaw',
|
||||
'GLOBAL_AUTORESPONDER_BACKEND=exim',
|
||||
'GLOBAL_AUTORESPONDER_REPLY_EVERY_MESSAGE=false',
|
||||
'GLOBAL_AUTORESPONDER_REPEAT_MINUTES=60',
|
||||
'GLOBAL_AUTORESPONDER_DYNAMIC_MAILBOX_SCOPE=true',
|
||||
'GLOBAL_AUTORESPONDER_MAX_SUBJECT_BYTES=255',
|
||||
'GLOBAL_AUTORESPONDER_MAX_BODY_BYTES=20000',
|
||||
@@ -24,11 +22,16 @@ test('settings validate defaults and external paths', function (): void {
|
||||
assert_same('Europe/Warsaw', $settings->timezone());
|
||||
assert_same('exact_hour', $settings->scheduleMode());
|
||||
assert_same('exim', $settings->backendMode());
|
||||
assert_same(60, $settings->repeatMinutes());
|
||||
assert_same('/usr/local/hitme_plugins/global-autoresponders/config', Settings::CONFIG_DIR);
|
||||
assert_same('/usr/local/hitme_plugins/global-autoresponders/data', Settings::DATA_DIR);
|
||||
});
|
||||
|
||||
test('settings template does not contain global repeat policy settings', function (): void {
|
||||
$template = file_get_contents(PLUGIN_ROOT . '/plugin-settings.conf') ?: '';
|
||||
assert_false(str_contains($template, 'GLOBAL_AUTORESPONDER_REPLY_EVERY_MESSAGE'));
|
||||
assert_false(str_contains($template, 'GLOBAL_AUTORESPONDER_REPEAT_MINUTES'));
|
||||
});
|
||||
|
||||
test('settings reject invalid timezone and schedule mode', function (): void {
|
||||
$path = TEST_TMP . '/bad-settings.conf';
|
||||
test_write($path, "GLOBAL_AUTORESPONDER_TIMEZONE=Not/AZone\nGLOBAL_AUTORESPONDER_BACKEND=bad\n");
|
||||
|
||||
Reference in New Issue
Block a user