diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-06-12 15:19:00 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-06-12 15:19:00 -0700 |
commit | 919e930aa9279b3c5cd12b593889cd6de79d67bf (patch) | |
tree | 77d7b94eb2050ea8d7bee2431dbb11d34abe9249 /rt/t/api/emailparser.t | |
parent | f303acf0bfdbd5debea67d391e111ae4ee62cb78 (diff) |
rt 4.0.23
Diffstat (limited to 'rt/t/api/emailparser.t')
-rw-r--r-- | rt/t/api/emailparser.t | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rt/t/api/emailparser.t b/rt/t/api/emailparser.t index 790314603..a58cb3623 100644 --- a/rt/t/api/emailparser.t +++ b/rt/t/api/emailparser.t @@ -2,12 +2,14 @@ use strict; use warnings; -use RT::Test nodb => 1, tests => 10; +use RT::Test tests => 11; -RT->Config->Set( RTAddressRegexp => qr/^rt\@example.com$/i ); +ok(require RT::EmailParser); +RT->Config->Set( RTAddressRegexp => undef ); +is(RT::EmailParser::IsRTAddress("",""),undef, "Empty emails from users don't match queues without email addresses" ); -ok(require RT::EmailParser); +RT->Config->Set( RTAddressRegexp => qr/^rt\@example.com$/i ); is(RT::EmailParser::IsRTAddress("","rt\@example.com"),1, "Regexp matched rt address" ); is(RT::EmailParser::IsRTAddress("","frt\@example.com"),undef, "Regexp didn't match non-rt address" ); |