use super::super::defs::*;
#[test]
fn condstore_status_highest_modseq() {
let setup = set_up();
let mut client = setup.connect("7162cshm");
quick_log_in(&mut client);
quick_create(&mut client, "7162cshm");
command!(mut responses = client, c("STATUS 7162cshm (HIGHESTMODSEQ)"));
assert_tagged_ok_any(responses.pop().unwrap());
has_untagged_response_matching! {
s::Response::Status(ref sr) in responses => {
assert_eq!(1, sr.atts.len());
assert_eq!(s::StatusResponseAtt::HighestModseq(1), sr.atts[0]);
}
};
quick_append_enron(&mut client, "7162cshm", 1);
command!(mut responses = client, c("STATUS 7162cshm (HIGHESTMODSEQ)"));
assert_tagged_ok_any(responses.pop().unwrap());
has_untagged_response_matching! {
s::Response::Status(ref sr) in responses => {
assert_eq!(1, sr.atts.len());
match sr.atts[0] {
s::StatusResponseAtt::HighestModseq(v) => assert!(v > 1),
_ => panic!("Unexpected attribute"),
}
}
};
}