From 45c55ee591d9aaddaeeffac9240e310951f71fe0 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Sat, 9 Sep 2023 14:36:45 +0200 Subject: fix tests and tests dependencies --- lib/JWebmail/Model/ReadMails/MockJSON.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/JWebmail/Model/ReadMails/MockJSON.pm') 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; -- cgit v1.2.3