Spaces:
Paused
Paused
| import Foundation | |
| import Testing | |
| @testable import OpenClaw | |
| struct KeychainStoreTests { | |
| func saveLoadUpdateDeleteRoundTrip() { | |
| let service = "bot.molt.tests.\(UUID().uuidString)" | |
| let account = "value" | |
| #expect(KeychainStore.delete(service: service, account: account)) | |
| #expect(KeychainStore.loadString(service: service, account: account) == nil) | |
| #expect(KeychainStore.saveString("first", service: service, account: account)) | |
| #expect(KeychainStore.loadString(service: service, account: account) == "first") | |
| #expect(KeychainStore.saveString("second", service: service, account: account)) | |
| #expect(KeychainStore.loadString(service: service, account: account) == "second") | |
| #expect(KeychainStore.delete(service: service, account: account)) | |
| #expect(KeychainStore.loadString(service: service, account: account) == nil) | |
| } | |
| } | |