]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/reply.t
reply: handle address obfuscation :<
[public-inbox.git] / t / reply.t
index 640069cb8cc5b4e961d216dc3b22b54425489cca..719b4e47565f06d3365ae43562e3c4ffcf657e4a 100644 (file)
--- a/t/reply.t
+++ b/t/reply.t
@@ -64,4 +64,16 @@ $ibx->{replyto} = 'new@example.com';
 $exp = [ '--in-reply-to=blah@example.com', '--to=new@example.com' ];
 is_deeply($arg, $exp, 'explicit address works, too');
 
+$ibx->{replyto} = ':all';
+$ibx->{obfuscate} = 1;
+($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
+$exp = [
+    '--in-reply-to=blah@example.com',
+    '--to=from@example$(echo .)com',
+    '--cc=cc@example$(echo .)com',
+    '--cc=to@example$(echo .)com'
+];
+is_deeply($arg, $exp, 'address obfuscation works');
+is($link, '', 'no mailto: link given');
+
 done_testing();