2022-03-08 06:16:36 +01:00
|
|
|
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
import Quick
|
|
|
|
import Nimble
|
|
|
|
|
|
|
|
@testable import SessionMessagingKit
|
|
|
|
|
|
|
|
class SOGSErrorSpec: QuickSpec {
|
2023-09-22 06:49:39 +02:00
|
|
|
override class func spec() {
|
|
|
|
// MARK: - a SOGSError
|
2022-03-08 06:16:36 +01:00
|
|
|
describe("a SOGSError") {
|
2023-09-22 06:49:39 +02:00
|
|
|
// MARK: -- generates the error description correctly
|
2022-03-08 06:16:36 +01:00
|
|
|
it("generates the error description correctly") {
|
2022-06-28 09:53:03 +02:00
|
|
|
expect(OpenGroupAPIError.decryptionFailed.errorDescription)
|
2022-03-08 06:16:36 +01:00
|
|
|
.to(equal("Couldn't decrypt response."))
|
2022-06-28 09:53:03 +02:00
|
|
|
expect(OpenGroupAPIError.signingFailed.errorDescription)
|
2022-03-08 06:16:36 +01:00
|
|
|
.to(equal("Couldn't sign message."))
|
2022-06-28 09:53:03 +02:00
|
|
|
expect(OpenGroupAPIError.noPublicKey.errorDescription)
|
2022-03-08 06:16:36 +01:00
|
|
|
.to(equal("Couldn't find server public key."))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|