aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-20 15:18:37 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-20 15:18:37 +1300
commit4688f3469f11b6c76e40af116baf6b58704123ae (patch)
treebeebe3478180f6bb29c35870f9db8230fb06b47e
parentRemove unneeded exists..defined test series (diff)
downloadMail-Run-Crypt-4688f3469f11b6c76e40af116baf6b58704123ae.tar.gz
Mail-Run-Crypt-4688f3469f11b6c76e40af116baf6b58704123ae.zip
Test that specifying encryption explicitly works
-rw-r--r--MANIFEST1
-rw-r--r--t/encrypt-explicit.t16
2 files changed, 17 insertions, 0 deletions
diff --git a/MANIFEST b/MANIFEST
index 7220b8f..3e563c8 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -7,6 +7,7 @@ MANIFEST
README
t/custom-name.t
t/encrypt.t
+t/encrypt-explicit.t
t/encrypt-sign.t
t/require-key-data.t
t/require-mailto.t
diff --git a/t/encrypt-explicit.t b/t/encrypt-explicit.t
new file mode 100644
index 0000000..9db5556
--- /dev/null
+++ b/t/encrypt-explicit.t
@@ -0,0 +1,16 @@
+#!perl -T
+
+use strict;
+use warnings;
+use utf8;
+
+use Test::More tests => 2;
+
+use Mail::Run::Crypt;
+
+our $VERSION = '0.07';
+
+my %opts = ( mailto => 'nobody@example.com', encrypt => 1 );
+my $mrc = Mail::Run::Crypt->new(%opts);
+ok( $mrc->{encrypt} == 1, 'encrypt_explicit_encrypt_on' );
+ok( $mrc->{sign} == 0, 'encrypt_explicit_sign_off' );