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