mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 06:46:32 +03:00
cargo fmt
This commit is contained in:
@@ -664,16 +664,18 @@ pub fn read_autoconf_file(context: &Context, url: &str) -> *mut libc::c_char {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|
||||||
use crate::test_utils::*;
|
|
||||||
use crate::config::*;
|
use crate::config::*;
|
||||||
use crate::configure::dc_job_do_DC_JOB_CONFIGURE_IMAP;
|
use crate::configure::dc_job_do_DC_JOB_CONFIGURE_IMAP;
|
||||||
use crate::job::*;
|
use crate::job::*;
|
||||||
use crate::param::*;
|
use crate::param::*;
|
||||||
|
use crate::test_utils::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_no_panic_on_bad_credentials() {
|
fn test_no_panic_on_bad_credentials() {
|
||||||
let t = dummy_context();
|
let t = dummy_context();
|
||||||
t.ctx.set_config(Config::Addr, Some("probably@unexistant.addr")).unwrap();
|
t.ctx
|
||||||
|
.set_config(Config::Addr, Some("probably@unexistant.addr"))
|
||||||
|
.unwrap();
|
||||||
t.ctx.set_config(Config::MailPw, Some("123456")).unwrap();
|
t.ctx.set_config(Config::MailPw, Some("123456")).unwrap();
|
||||||
let job = Job {
|
let job = Job {
|
||||||
job_id: 1,
|
job_id: 1,
|
||||||
@@ -686,6 +688,8 @@ mod tests {
|
|||||||
try_again: 0,
|
try_again: 0,
|
||||||
pending_error: None,
|
pending_error: None,
|
||||||
};
|
};
|
||||||
unsafe { dc_job_do_DC_JOB_CONFIGURE_IMAP(&t.ctx, &job); }
|
unsafe {
|
||||||
|
dc_job_do_DC_JOB_CONFIGURE_IMAP(&t.ctx, &job);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user