Skip to content

Commit 9ed111b

Browse files
committed
Add test for rendering gutenberg comment
1 parent cf10e7b commit 9ed111b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

AztecTests/Renderers/CommentAttachmentRendererTests.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,18 @@ class CommentAttachmentRendererTests: XCTestCase {
4646

4747
XCTAssertEqual(bounds, expectedBounds)
4848
}
49+
50+
func testImageForGutenbergCommentIsNil() {
51+
// Given
52+
let textView = TextViewStub()
53+
let gutenbergComment = CommentAttachment()
54+
gutenbergComment.text = "wp:paragraph"
55+
let renderer = CommentAttachmentRenderer(font: .systemFont(ofSize: 12))
56+
57+
// When
58+
let image = renderer.textView(textView, imageFor: gutenbergComment, with: .init(width: -1, height: -1))
59+
60+
// Then
61+
XCTAssertNil(image)
62+
}
4963
}

0 commit comments

Comments
 (0)