Fix ComposerToolbarViewModel user suggestion selection unit test

This commit is contained in:
Stefan Ceriu 2024-06-17 09:31:33 +03:00
parent 1ebe2438ec
commit 5f9310e943

View File

@ -136,7 +136,8 @@ class ComposerToolbarViewModelTests: XCTestCase {
let suggestion = SuggestionItem.user(item: .init(id: "@test:matrix.org", displayName: "Test", avatarURL: nil, range: .init()))
viewModel.context.send(viewAction: .selectedSuggestion(suggestion))
XCTAssertEqual(wysiwygViewModel.content.html, "<a href=\"https://matrix.to/#/@test:matrix.org\">Test</a> ")
// The display name can be used for HTML injection in the rich text editor and it's useless anyway as the clients don't use it when resolving display names
XCTAssertEqual(wysiwygViewModel.content.html, "<a href=\"https://matrix.to/#/@test:matrix.org\">@test:matrix.org</a> ")
}
func testAllUsersSuggestion() {