Create helper extensions for Block and update tests for the Block helper model

Closes: https://github.com/damus-io/damus/pull/1528
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
Grimless
2023-09-01 11:32:01 -04:00
committed by William Casarin
parent a64f898df7
commit 6ee0be40e9
8 changed files with 205 additions and 89 deletions

View File

@@ -33,7 +33,7 @@ class NoteContentViewTests: XCTestCase {
let testNote = NostrEvent.owned_from_json(json: testJSONWithEscapedSlashes)!
let parsed = parse_note_content(content: .init(note: testNote, keypair: test_keypair))
XCTAssertTrue((parsed.blocks[0].is_url != nil), "NoteContentView does not correctly parse an image block when url in JSON content contains optional escaped slashes.")
XCTAssertTrue((parsed.blocks[0].asURL != nil), "NoteContentView does not correctly parse an image block when url in JSON content contains optional escaped slashes.")
}
}