test .gpg-id support
mostly using mocks
This commit is contained in:
parent
38649f96fe
commit
5c416bfb21
2 changed files with 105 additions and 18 deletions
|
|
@ -184,8 +184,8 @@ final class PGPAgentTest: XCTestCase {
|
|||
try importKeys(RSA2048_RSA4096.publicKeys | ED25519.publicKey, RSA2048_RSA4096.privateKeys)
|
||||
try pgpAgent.initKeys()
|
||||
|
||||
XCTAssertEqual(try pgpAgent.getKeyIDs(type: .PUBLIC).map(\.localizedLowercase).sorted(), (RSA2048_RSA4096.longFingerprints + [ED25519.longFingerprint]).sorted())
|
||||
XCTAssertEqual(try pgpAgent.getKeyIDs(type: .PRIVATE).map(\.localizedLowercase).sorted(), RSA2048_RSA4096.longFingerprints.sorted())
|
||||
XCTAssertEqual(try pgpAgent.getKeyIDs(type: .PUBLIC).map { $0.lowercased() }.sorted(), (RSA2048_RSA4096.longFingerprints + [ED25519.longFingerprint]).sorted())
|
||||
XCTAssertEqual(try pgpAgent.getKeyIDs(type: .PRIVATE).map { $0.lowercased() }.sorted(), RSA2048_RSA4096.longFingerprints.sorted())
|
||||
|
||||
let encryptedData = try pgpAgent.encrypt(plainData: testData, keyIDs: RSA2048_RSA4096.fingerprints + [ED25519.fingerprint])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue