Fix automated test issues
Closes: https://github.com/damus-io/damus/issues/3275 Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
@@ -12,12 +12,12 @@ import EmojiPicker
|
||||
// Generates a test damus state with configurable mock parameters
|
||||
func generate_test_damus_state(
|
||||
mock_profile_info: [Pubkey: Profile]?,
|
||||
home: HomeModel? = nil
|
||||
home: HomeModel? = nil,
|
||||
addNdbToRelayPool: Bool = true
|
||||
) -> DamusState {
|
||||
// Create a unique temporary directory
|
||||
let ndb = Ndb.test
|
||||
let our_pubkey = test_pubkey
|
||||
let pool = RelayPool(ndb: ndb)
|
||||
let settings = UserSettingsStore()
|
||||
|
||||
let profiles: Profiles = {
|
||||
@@ -51,7 +51,8 @@ func generate_test_damus_state(
|
||||
ndb: ndb,
|
||||
quote_reposts: .init(our_pubkey: our_pubkey),
|
||||
emoji_provider: DefaultEmojiProvider(showAllVariations: false),
|
||||
favicon_cache: .init()
|
||||
favicon_cache: .init(),
|
||||
addNdbToRelayPool: addNdbToRelayPool
|
||||
)
|
||||
|
||||
home?.damus_state = damus
|
||||
|
||||
Reference in New Issue
Block a user