summaryrefslogtreecommitdiff
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
parent4f0692e955ae7f7ef8d102342e20f03e874cf061 (diff)
fix tests and tests dependencies
-rwxr-xr-xconfigure2
-rw-r--r--lib/JWebmail/Model/ReadMails/MockJSON.pm8
-rw-r--r--t/Extract.t8
3 files changed, 11 insertions, 7 deletions
diff --git a/configure b/configure
index c37fc0b..b5d50e4 100755
--- a/configure
+++ b/configure
@@ -98,7 +98,7 @@ check_command m4
check_command ninja
check_ninja_version 1.11
-check_perl_deps 'Mojolicious 9.31' Email::MIME Role::Tiny Class::Method::Modifiers TOML::Tiny namespace::clean
+check_perl_deps 'Mojolicious 9.31' Email::MIME Role::Tiny Class::Method::Modifiers TOML::Tiny namespace::clean Test2::Bundle::More MIME::Words
check_node_module bulma
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;
diff --git a/t/Extract.t b/t/Extract.t
index f7c61ee..3869b39 100644
--- a/t/Extract.t
+++ b/t/Extract.t
@@ -7,12 +7,10 @@ use Test::More;
use JSON::PP 'decode_json';
use List::Util 'min';
+use JWebmail::Config 'MAILDIR_EXTRACTOR';
-my $EXTRACT = {
- perl_mail_box => 'script/qmauth.pl',
- python_mailbox => 'script/qmauth.py',
- rust_maildir => 'bin/jwebmail-extract',
-}->{python_mailbox};
+
+my $EXTRACT = MAILDIR_EXTRACTOR;
my $MAILDIR = 't/testdata';
my $SYS_USER = $ENV{USER};
my $MAIL_USER = 'maildir';