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

Commit 25bd173

Browse files
committed
Add test for since
1 parent 6394f63 commit 25bd173

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

mutiny-core/src/lib.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -2883,7 +2883,16 @@ mod tests {
28832883

28842884
// check that we got different messages
28852885
assert_eq!(next.len(), 2);
2886-
assert!(next.iter().all(|m| !messages.contains(m)))
2886+
assert!(next.iter().all(|m| !messages.contains(m)));
2887+
2888+
// test check for future messages, should be empty
2889+
let since = messages.iter().max_by_key(|m| m.date).unwrap().date + 1;
2890+
let future_msgs = mw
2891+
.get_dm_conversation(npub, limit, None, Some(since))
2892+
.await
2893+
.unwrap();
2894+
2895+
assert!(future_msgs.is_empty());
28872896
}
28882897

28892898
#[test]

0 commit comments

Comments
 (0)