diff --git a/DuckDuckGoTests/MockSecureVault.swift b/DuckDuckGoTests/MockSecureVault.swift index 94c1cb0def..ad0cac1d33 100644 --- a/DuckDuckGoTests/MockSecureVault.swift +++ b/DuckDuckGoTests/MockSecureVault.swift @@ -96,6 +96,12 @@ final class MockSecureVault: AutofillSecureVault { return accountID } + func updateLastUsedFor(accountId: Int64) throws { + if var account = storedAccounts.first(where: { $0.id == String(accountId) }) { + account.lastUsed = Date() + } + } + func deleteWebsiteCredentialsFor(accountId: Int64) throws { storedCredentials[accountId] = nil } @@ -274,6 +280,12 @@ class MockDatabaseProvider: AutofillDatabaseProvider { return _accounts } + func updateLastUsedForAccountId(_ accountId: Int64) throws { + if var account = _accounts.first(where: { $0.id == String(accountId) }) { + account.lastUsed = Date() + } + } + func deleteWebsiteCredentialsForAccountId(_ accountId: Int64) throws { self._accounts = self._accounts.filter { $0.id != String(accountId) } }