session-ios/SessionMessagingKitTests/Contacts/BlindedIdLookupSpec.swift
Morgan Pretty eb0118ac10 Fixed a few more bugs and tweaked attachment download logic
Updated the code to only auto-start attachment downloads when a user opens a conversation (and only for the current page of messages)
Updated the GarbageCollectionJob to default to handling all cases (instead of requiring the cases to be defined) - this means we can add future cases without having to recreate the default job
Added logic to remove approved blinded contact records as part of the GarbageCollectionJob
Added code to better handle "invalid" attachments when migrating
Added a mechanism to retrieve the details for currently running jobs (ie. allows us to check for duplicate concurrent jobs)
Resolved the remaining TODOs in the GRDB migration code
Cleaned up DB update logic to update only the targeted columns
Fixed a bug due to a typo in a localised string
Fixed a bug where link previews without images or with custom copy weren't being processed as link previews
Fixed a bug where Open Groups could display with an empty name value
2022-07-01 12:52:41 +10:00

33 lines
1 KiB
Swift

// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
import Foundation
import Quick
import Nimble
@testable import SessionMessagingKit
class BlindedIdLookupSpec: QuickSpec {
// MARK: - Spec
override func spec() {
describe("a BlindedIdLookup") {
context("when initializing") {
it("sets the values correctly") {
let lookup: BlindedIdLookup = BlindedIdLookup(
blindedId: "testBlindedId",
sessionId: "testSessionId",
openGroupServer: "testServer",
openGroupPublicKey: "testPublicKey"
)
expect(lookup.blindedId).to(equal("testBlindedId"))
expect(lookup.sessionId).to(equal("testSessionId"))
expect(lookup.openGroupServer).to(equal("testServer"))
expect(lookup.openGroupPublicKey).to(equal("testPublicKey"))
}
}
}
}
}