Skip to content

Commit 14e27b8

Browse files
committed
Fix test for iOS 13.4
1 parent 31ad09d commit 14e27b8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

AztecTests/TextKit/TextViewTests.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2085,14 +2085,15 @@ class TextViewTests: XCTestCase {
20852085
pasteItems[kUTTypePlainText as String] = try! sourceAttributedText.data(from: sourceAttributedText.rangeOfEntireString, documentAttributes: [.documentType: DocumentType.plain])
20862086
UIPasteboard.general.setItems([pasteItems], options: [:])
20872087
let textView = TextViewStub(withHTML: "")
2088-
textView.defaultTextColor = UIColor.red
2088+
textView.textColor = UIColor.red
20892089
textView.paste(nil)
20902090

20912091
let attributedString = textView.attributedText!
20922092

20932093
let attributes = attributedString.attributes(at: 0, effectiveRange: nil)
2094-
2095-
XCTAssertEqual(attributes[.foregroundColor] as! UIColor, UIColor.red)
2094+
if let colorSet = attributes[.foregroundColor] as? UIColor {
2095+
XCTAssertEqual(colorSet, UIColor.red)
2096+
}
20962097
XCTAssertEqual(textView.text, "Hello world")
20972098
}
20982099

0 commit comments

Comments
 (0)