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

Commit

Permalink
Add test for since
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Feb 5, 2024
1 parent 4821fdc commit 501e9bb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mutiny-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2859,7 +2859,16 @@ mod tests {

// check that we got different messages
assert_eq!(next.len(), 2);
assert!(next.iter().all(|m| !messages.contains(m)))
assert!(next.iter().all(|m| !messages.contains(m)));

// test check for future messages, should be empty
let since = messages.iter().max_by_key(|m| m.date).unwrap().date + 1;
let future_msgs = mw
.get_dm_conversation(npub, limit, None, Some(since))
.await
.unwrap();

assert!(future_msgs.is_empty());
}

#[test]
Expand Down

0 comments on commit 501e9bb

Please sign in to comment.