X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Ft%2Fapi%2Femailparser.t;h=a58cb3623f3861e371cb020515adc8036204062f;hb=31f3763747b82764bb019cfab5b2a2945fc9a99d;hp=7903146030474d2345e5a0f89eac9abebe80e03a;hpb=6587f6ba7d047ddc1686c080090afe7d53365bd4;p=freeside.git 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" );