From 13c6219c3679ca7ac846b902a02d4a59e7ede21e Mon Sep 17 00:00:00 2001 From: Dominik Bucher Date: Tue, 20 Feb 2024 12:14:39 +0100 Subject: [PATCH] Fix test --- .../RichTextCoordinatorIntegrationTests+UIKit.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Tests/RichTextKitTests/RichTextCoordinatorIntegrationTests+UIKit.swift b/Tests/RichTextKitTests/RichTextCoordinatorIntegrationTests+UIKit.swift index 8592b2bcc..8b77548bb 100644 --- a/Tests/RichTextKitTests/RichTextCoordinatorIntegrationTests+UIKit.swift +++ b/Tests/RichTextKitTests/RichTextCoordinatorIntegrationTests+UIKit.swift @@ -68,14 +68,13 @@ final class RichTextCoordinatorIntegrationTests: XCTestCase { textView.simulateTyping(of: firstTypingPart) - let attributes = textView.richTextAttributes textContext.selectRange(NSRange(location: Self.initialAttributedString.length, length: firstTypingPart.count)) - XCTAssertEqual(attributes[.font] as? FontRepresentable, FontRepresentable.systemFont(ofSize: 16)) - XCTAssertEqual(attributes[.foregroundColor] as? ColorRepresentable, ColorRepresentable.red) + XCTAssertEqual(textView.richTextAttributes[.font] as? FontRepresentable, FontRepresentable.systemFont(ofSize: 16)) + XCTAssertEqual(textView.richTextAttributes[.foregroundColor] as? ColorRepresentable, ColorRepresentable.red) textView.setRichTextStyle(.strikethrough, to: true) - XCTAssertEqual(attributes[.strikethroughStyle] as? Int, 1) + XCTAssertEqual(textView.richTextAttributes[.strikethroughStyle] as? Int, 1) } } #endif