|
|
@ -36,17 +36,14 @@ final class InvoiceTests: XCTestCase { |
|
|
|
|
|
|
|
func testTextAfterInvoice() throws { |
|
|
|
let invstr = """ |
|
|
|
LNBC1P3MR5UJSP5G7SA48YD4JWTTPCHWMY4QYN4UWZQCJQ8NMWKD6QE3HCRVYTDLH9SPP57YM9TSA9NN4M4XU59XMJCXKR7YDV29DDP6LVQUT46ZW6CU3KE9GQDQ9V9H8JXQ8P3MYLZJCQPJRZJQF60PZDVNGGQWQDNERZSQN35L8CVQ3QG2Z5NSZYD0D3Q0JW2TL6VUZA7FYQQWKGQQYQQQQLGQQQQXJQQ9Q9QXPQYSGQ39EM4QJMQFKZGJXZVGL7QJMYNSWA8PGDTAGXXRG5Z92M7VLCGKQK2L2THDF8LM0AUKAURH7FVAWDLRNMVF38W4EYJDNVN9V4Z9CRS5CQCV465C |
|
|
|
|
|
|
|
hi there |
|
|
|
LNBC1P3MR5UJSP5G7SA48YD4JWTTPCHWMY4QYN4UWZQCJQ8NMWKD6QE3HCRVYTDLH9SPP57YM9TSA9NN4M4XU59XMJCXKR7YDV29DDP6LVQUT46ZW6CU3KE9GQDQ9V9H8JXQ8P3MYLZJCQPJRZJQF60PZDVNGGQWQDNERZSQN35L8CVQ3QG2Z5NSZYD0D3Q0JW2TL6VUZA7FYQQWKGQQYQQQQLGQQQQXJQQ9Q9QXPQYSGQ39EM4QJMQFKZGJXZVGL7QJMYNSWA8PGDTAGXXRG5Z92M7VLCGKQK2L2THDF8LM0AUKAURH7FVAWDLRNMVF38W4EYJDNVN9V4Z9CRS5CQCV465C hi there |
|
|
|
""" |
|
|
|
let parsed = parse_mentions(content: invstr, tags: []) |
|
|
|
|
|
|
|
XCTAssertNotNil(parsed) |
|
|
|
XCTAssertEqual(parsed.count, 2) |
|
|
|
print(parsed) |
|
|
|
XCTAssertNotNil(parsed[0].is_invoice) |
|
|
|
XCTAssertNotNil(parsed[1].is_text, "hi there") |
|
|
|
XCTAssertEqual(parsed[1].is_text, " hi there") |
|
|
|
guard let invoice = parsed[0].is_invoice else { |
|
|
|
return |
|
|
|
} |
|
|
|