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