Fix nid search test

This commit is contained in:
RumovZ 2021-01-28 16:29:34 +01:00
parent 407358ab68
commit da6f3b7e76
2 changed files with 6 additions and 2 deletions

View File

@ -264,7 +264,11 @@ impl From<pb::NoteId> for NoteID {
impl pb::NoteIDs {
fn into_id_string(self) -> String {
self.nids.iter().map(|i| i.to_string()).collect::<Vec<_>>().join(",")
self.nids
.iter()
.map(|i| i.to_string())
.collect::<Vec<_>>()
.join(",")
}
}

View File

@ -813,7 +813,7 @@ mod test {
assert_eq!(parse("tag:hard")?, vec![Search(Tag("hard".into()))]);
assert_eq!(
parse("nid:1237123712,2,3")?,
vec![Search(NoteIDs("1237123712,2,3"))]
vec![Search(NoteIDs("1237123712,2,3".into()))]
);
assert_eq!(parse("is:due")?, vec![Search(State(StateKind::Due))]);
assert_eq!(parse("flag:3")?, vec![Search(Flag(3))]);