mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
fix config unit tests
This commit is contained in:
@@ -121,10 +121,10 @@ impl DeserializedConfig {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use pimalaya_email::{EmailSender, MaildirConfig, SendmailConfig, SmtpConfig};
|
use pimalaya_email::{EmailSender, MaildirConfig, SendmailConfig, SmtpConfig};
|
||||||
|
|
||||||
#[cfg(feature = "imap-backend")]
|
|
||||||
use pimalaya_email::ImapConfig;
|
|
||||||
#[cfg(feature = "notmuch-backend")]
|
#[cfg(feature = "notmuch-backend")]
|
||||||
use pimalaya_email::NotmuchConfig;
|
use pimalaya_email::NotmuchConfig;
|
||||||
|
#[cfg(feature = "imap-backend")]
|
||||||
|
use pimalaya_email::{ImapAuthConfig, ImapConfig};
|
||||||
|
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use tempfile::NamedTempFile;
|
use tempfile::NamedTempFile;
|
||||||
@@ -261,7 +261,7 @@ mod tests {
|
|||||||
.unwrap_err()
|
.unwrap_err()
|
||||||
.root_cause()
|
.root_cause()
|
||||||
.to_string()
|
.to_string()
|
||||||
.contains("missing field `imap-passwd-cmd`"));
|
.contains("missing field `imap-auth`"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -487,7 +487,7 @@ mod tests {
|
|||||||
imap-host = \"localhost\"
|
imap-host = \"localhost\"
|
||||||
imap-port = 993
|
imap-port = 993
|
||||||
imap-login = \"login\"
|
imap-login = \"login\"
|
||||||
imap-passwd-cmd = \"echo password\"",
|
imap-auth = { raw-passwd = \"password\" }",
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
@@ -504,7 +504,7 @@ mod tests {
|
|||||||
host: "localhost".into(),
|
host: "localhost".into(),
|
||||||
port: 993,
|
port: 993,
|
||||||
login: "login".into(),
|
login: "login".into(),
|
||||||
passwd_cmd: "echo password".into(),
|
auth: ImapAuthConfig::RawPasswd("password".into()),
|
||||||
..ImapConfig::default()
|
..ImapConfig::default()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user