-
Notifications
You must be signed in to change notification settings - Fork 269
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
base: main
Are you sure you want to change the base?
test(sdk): Add test for maybe_apply_new_redaction
#4760
Conversation
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4760 +/- ##
==========================================
+ Coverage 86.28% 86.29% +0.01%
==========================================
Files 290 290
Lines 34281 34281
==========================================
+ Hits 29578 29583 +5
+ Misses 4703 4698 -5 ☔ View full report in Codecov by Sentry. |
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.
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