summaryrefslogtreecommitdiff
path: root/lib/JWebmail
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2023-09-09 14:36:45 +0200
committerJannis M. Hoffmann <jannis@fehcom.de>2023-09-09 14:36:45 +0200
commit45c55ee591d9aaddaeeffac9240e310951f71fe0 (patch)
tree32386f3edeca49188b9d0ea6ad357818dae81082 /lib/JWebmail
parent4f0692e955ae7f7ef8d102342e20f03e874cf061 (diff)
fix tests and tests dependencies
Diffstat (limited to 'lib/JWebmail')
-rw-r--r--lib/JWebmail/Model/ReadMails/MockJSON.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/JWebmail/Model/ReadMails/MockJSON.pm b/lib/JWebmail/Model/ReadMails/MockJSON.pm
index 9ad5f09..70daf8f 100644
--- a/lib/JWebmail/Model/ReadMails/MockJSON.pm
+++ b/lib/JWebmail/Model/ReadMails/MockJSON.pm
@@ -8,7 +8,13 @@ use autodie;
use List::Util 'sum';
use JSON::PP 'decode_json';
-use Digest::HMAC_MD5 'hmac_md5_hex';
+use JWebmail::Config 'LOGIN_SCHEME';
+
+if (LOGIN_SCHEME eq fc 'cram_md5') {
+ require Digest::HMAC_MD5;
+ Digest::HMAC_MD5->import('hmac_md5_hex');
+}
+
use Role::Tiny::With;
use namespace::clean;