Skip to content

testDecryptKeyWithWrongPassPhrase should expect a particular error to be thrown #872

@tomholub

Description

@tomholub

todo - finish test

Originally posted by @tomholub in #854 (comment)

    func testDecryptKeyWithWrongPassPhrase() async {
        do {
            _ = try await core.decryptKey(armoredPrv: TestData.k0.prv, passphrase: "wrong")
            XCTFail("Should have thrown above")
        } catch {
            Logger.logDebug("catched \(error)")
            return
        }
        XCTFail("Should have thrown above")
    }

Logger to replace with an assert

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions