mirror of
https://github.com/soywod/himalaya.git
synced 2024-09-05 18:41:11 +00:00
fix integration tests
This commit is contained in:
parent
dcbbe01c94
commit
9d40a7d30f
|
@ -1,6 +1,8 @@
|
||||||
extern crate himalaya;
|
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 {
|
fn get_account(addr: &str) -> Account {
|
||||||
Account {
|
Account {
|
||||||
|
@ -29,9 +31,8 @@ fn get_account(addr: &str) -> Account {
|
||||||
fn mbox() {
|
fn mbox() {
|
||||||
let account = get_account("inbox@localhost");
|
let account = get_account("inbox@localhost");
|
||||||
let mut imap_conn = ImapConnector::new(&account).unwrap();
|
let mut imap_conn = ImapConnector::new(&account).unwrap();
|
||||||
let mboxes: Vec<String> = imap_conn
|
let names = imap_conn.list_mboxes().unwrap();
|
||||||
.list_mboxes()
|
let mboxes: Vec<String> = Mboxes::from(&names)
|
||||||
.unwrap()
|
|
||||||
.0
|
.0
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|mbox| mbox.name)
|
.map(|mbox| mbox.name)
|
||||||
|
|
Loading…
Reference in a new issue