Fix broken tests.

This commit is contained in:
Matthew Chen 2019-11-07 13:27:30 -03:00
parent b572f728d0
commit 17baff765b
2 changed files with 4 additions and 1 deletions

View File

@ -172,6 +172,9 @@ class SMKServerCertificateTest: XCTestCase {
} catch SMKError.assertionError {
// Some bad certificates will fail to parse.
continue
} catch ECKeyError.assertionError {
// Some bad certificates will fail to parse.
continue
} catch {
XCTFail("Unexpected parsing error: \(error)")
continue

View File

@ -81,7 +81,7 @@ class MockClient: NSObject {
func generateMockPreKey() -> PreKeyRecord {
let preKeyId: Int32 = Int32(arc4random_uniform(UInt32(INT32_MAX)))
let keyPair = Curve25519.generateKeyPair()
let preKey = PreKeyRecord(id: preKeyId, keyPair: keyPair)!
let preKey = PreKeyRecord(id: preKeyId, keyPair: keyPair, createdAt: Date())!
self.preKeyStore.storePreKey(preKeyId, preKeyRecord: preKey)
return preKey
}