-
Notifications
You must be signed in to change notification settings - Fork 289
test(sdk): Add test for maybe_apply_new_redaction
#4760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(sdk): Add test for maybe_apply_new_redaction
#4760
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4760 +/- ##
=======================================
Coverage 86.28% 86.28%
=======================================
Files 290 290
Lines 34281 34281
=======================================
+ Hits 29578 29581 +3
+ Misses 4703 4700 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the forgotten test. I left a small suggestion but feel free to ignore.
AnySyncTimelineEvent::MessageLike(AnySyncMessageLikeEvent::RoomMessage(event)) => { | ||
// The event has been redacted! | ||
assert!(event.as_original().is_none()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AnySyncTimelineEvent::MessageLike(AnySyncMessageLikeEvent::RoomMessage(event)) => { | |
// The event has been redacted! | |
assert!(event.as_original().is_none()); | |
AnySyncTimelineEvent::MessageLike(event) => { | |
// The event has been redacted! | |
assert!(event.is_redacted()); |
Not quite the same, but if we only care about the fact that the event is redacted might be nicer to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, didn't know about this one! Fixed up and rebased.
This patch adds a test for `maybe_apply_new_redaction` when the redacted event is not loaded in-memory, i.e. when it lives in the store only.
208e6ed
to
30a1eea
Compare
Follow up of #4740. I forgot to add a test!
This patch adds a test for
maybe_apply_new_redaction
when the redacted event is not loaded in-memory, i.e. when it lives in the store only.EventCache
storage #3280