Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 855a9dc

Browse files
committed
Add test for since
1 parent b9352d5 commit 855a9dc

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

mutiny-core/src/lib.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2866,7 +2866,16 @@ mod tests {
28662866

28672867
// check that we got different messages
28682868
assert_eq!(next.len(), 2);
2869-
assert!(next.iter().all(|m| !messages.contains(m)))
2869+
assert!(next.iter().all(|m| !messages.contains(m)));
2870+
2871+
// test check for future messages, should be empty
2872+
let since = messages.iter().max_by_key(|m| m.date).unwrap().date + 1;
2873+
let future_msgs = mw
2874+
.get_dm_conversation(npub, limit, None, Some(since))
2875+
.await
2876+
.unwrap();
2877+
2878+
assert!(future_msgs.is_empty());
28702879
}
28712880

28722881
#[test]

0 commit comments

Comments
 (0)