DraftTests.swift (613B)
1 // 2 // DraftTests.swift 3 // damusTests 4 // 5 // Created by Daniel D’Aquino on 2025-01-15 6 7 import XCTest 8 @testable import damus 9 10 class DraftTests: XCTestCase { 11 func testRoundtripNIP37Draft() { 12 let test_note = 13 NostrEvent( 14 content: "Test", 15 keypair: test_keypair_full.to_keypair(), 16 createdAt: UInt32(Date().timeIntervalSince1970 - 100) 17 )! 18 let draft = try! NIP37Draft(unwrapped_note: test_note, draft_id: "test", keypair: test_keypair_full)! 19 XCTAssertEqual(draft.unwrapped_note, test_note) 20 } 21 }