nostrdb: add profiles to nostrdb
This adds profiles to nostrdb - Remove in-memory Profiles caches, nostrdb is as fast as an in-memory cache - Remove ProfileDatabase and just use nostrdb directly Changelog-Changed: Use nostrdb for profiles
This commit is contained in:
@@ -33,6 +33,11 @@ final class NdbTests: XCTestCase {
|
||||
|
||||
}
|
||||
|
||||
func test_profile_creation() {
|
||||
let profile = make_test_profile()
|
||||
XCTAssertEqual(profile.name, "jb55")
|
||||
}
|
||||
|
||||
func test_ndb_init() {
|
||||
|
||||
do {
|
||||
@@ -54,7 +59,8 @@ final class NdbTests: XCTestCase {
|
||||
XCTAssertNotNil(profile)
|
||||
guard let profile else { return }
|
||||
|
||||
XCTAssertEqual(profile.name, "jb55")
|
||||
XCTAssertEqual(profile.profile?.name, "jb55")
|
||||
XCTAssertEqual(profile.lnurl, "fixme")
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +77,7 @@ final class NdbTests: XCTestCase {
|
||||
XCTAssertEqual(note.id, id)
|
||||
XCTAssertEqual(note.pubkey, pubkey)
|
||||
|
||||
XCTAssertEqual(note.count, 34322)
|
||||
XCTAssertEqual(note.count, 34328)
|
||||
XCTAssertEqual(note.kind, 3)
|
||||
XCTAssertEqual(note.created_at, 1689904312)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user