fix integration tests

This commit is contained in:
Clément DOUIN 2021-05-04 23:19:05 +02:00
parent dcbbe01c94
commit 9d40a7d30f
No known key found for this signature in database
GPG key ID: 69C9B9CFFDEE2DEF

View file

@ -1,6 +1,8 @@
extern crate himalaya;
use himalaya::{config::model::Account, imap::model::ImapConnector, msg::model::Msgs, smtp};
use himalaya::{
config::model::Account, imap::model::ImapConnector, mbox::model::Mboxes, msg::model::Msgs, smtp,
};
fn get_account(addr: &str) -> Account {
Account {
@ -29,9 +31,8 @@ fn get_account(addr: &str) -> Account {
fn mbox() {
let account = get_account("inbox@localhost");
let mut imap_conn = ImapConnector::new(&account).unwrap();
let mboxes: Vec<String> = imap_conn
.list_mboxes()
.unwrap()
let names = imap_conn.list_mboxes().unwrap();
let mboxes: Vec<String> = Mboxes::from(&names)
.0
.into_iter()
.map(|mbox| mbox.name)