Files
secretive/Sources/Packages/Tests/SecretKitTests/AnySecretTests.swift
T
Max Goedjen c0562ba50a Allow after first unlock accessibility (#871)
* Allow after first unlock

* Fix tests

* Fix tests
2026-11-17 20:28:30 -08:00

21 lines
700 B
Swift

import Foundation
import Testing
@testable import SecretKit
@testable import SecureEnclaveSecretKit
@testable import SmartCardSecretKit
@Suite struct AnySecretTests {
@Test func eraser() {
let data = Data(UUID().uuidString.utf8)
let secret = SmartCard.Secret(id: data, name: "Name", publicKey: data, attributes: Attributes(keyType: KeyType(algorithm: .ecdsa, size: 256), authentication: .notRequired, allowWhileLocked: true))
let erased = AnySecret(secret)
#expect(erased.id == secret.id as AnyHashable)
#expect(erased.name == secret.name)
#expect(erased.keyType == secret.keyType)
#expect(erased.publicKey == secret.publicKey)
}
}