tests: add ndb support to tests
stops it from crashing
This commit is contained in:
@@ -11,7 +11,7 @@ import XCTest
|
||||
final class UserSearchCacheTests: XCTestCase {
|
||||
|
||||
var keypair: FullKeypair? = nil
|
||||
let damusState = DamusState.empty
|
||||
let damusState = test_damus_state
|
||||
let nip05 = "_@somedomain.com"
|
||||
|
||||
@MainActor
|
||||
@@ -55,11 +55,6 @@ final class UserSearchCacheTests: XCTestCase {
|
||||
|
||||
damusState.profiles.set_validated(keypair.pubkey, nip05: NIP05.parse(newNip05))
|
||||
|
||||
let newProfile = Profile(name: "whoami", display_name: "T-DAWG", about: nil, picture: nil, banner: nil, website: nil, lud06: nil, lud16: nil, nip05: newNip05, damus_donation: nil)
|
||||
|
||||
// Lookup to synchronize access on profiles dictionary to avoid race conditions.
|
||||
let _ = damusState.profiles.lookup(id: keypair.pubkey)
|
||||
|
||||
// Old profile attributes are removed from cache.
|
||||
XCTAssertEqual(damusState.user_search_cache.search(key: "tyiu"), [])
|
||||
XCTAssertEqual(damusState.user_search_cache.search(key: "ty"), [])
|
||||
|
||||
Reference in New Issue
Block a user