Skip to content
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: minimize usage of EventFactory::state_key #4562

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Jan 21, 2025

It was used in places where we could make use of other helpers, in some cases. Also introduces the room_avatar helper to create the room avatar state event.

Part of #3716

It was used in places where we could make use of other helpers, in some
cases. Also introduces the `room_avatar` helper to create the room
avatar state event.
@bnjbvr bnjbvr requested a review from a team as a code owner January 21, 2025 09:31
@bnjbvr bnjbvr requested review from Hywan and removed request for a team January 21, 2025 09:31
Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w00t

let mut content = RoomAvatarEventContent::new();
content.url = Some(avatar_url_1.to_owned());
let event = factory.event(content).state_key("").into_raw_sync();
let event = factory.room_avatar().url(avatar_url_1).into_raw_sync();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So smooth.

@bnjbvr bnjbvr enabled auto-merge (rebase) January 21, 2025 09:39
@bnjbvr bnjbvr merged commit 210c574 into main Jan 21, 2025
40 checks passed
@bnjbvr bnjbvr deleted the bnjbvr/minimize-state-key-helper-usage branch January 21, 2025 09:50
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.39%. Comparing base (0c74abb) to head (409004a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4562      +/-   ##
==========================================
- Coverage   85.41%   85.39%   -0.02%     
==========================================
  Files         285      285              
  Lines       32218    32218              
==========================================
- Hits        27518    27514       -4     
- Misses       4700     4704       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants