mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 07:25:19 +00:00
[codex] Refactor BLE transport event handling (#1266)
* Refactor BLE transport event handling * Make image output paths unique * Keep queued Nostr read receipts alive * Allow self-authored RSR ingress replies --------- Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
@@ -64,4 +64,19 @@ struct ImageUtilsTests {
|
||||
#expect(data.starts(with: Data([0xFF, 0xD8])))
|
||||
#expect(data.count > 0)
|
||||
}
|
||||
|
||||
@Test
|
||||
func processImage_usesUniqueOutputURLs() throws {
|
||||
let image = makePlatformImage(size: CGSize(width: 64, height: 64))
|
||||
let firstURL = try ImageUtils.processImage(image, maxDimension: 64)
|
||||
let secondURL = try ImageUtils.processImage(image, maxDimension: 64)
|
||||
defer {
|
||||
try? FileManager.default.removeItem(at: firstURL)
|
||||
try? FileManager.default.removeItem(at: secondURL)
|
||||
}
|
||||
|
||||
#expect(firstURL != secondURL)
|
||||
#expect(FileManager.default.fileExists(atPath: firstURL.path))
|
||||
#expect(FileManager.default.fileExists(atPath: secondURL.path))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user