mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.1 KiB
Swift
29 lines
1.1 KiB
Swift
5 years ago
|
@testable import SignalServiceKit
|
||
|
import XCTest
|
||
|
import Curve25519Kit
|
||
|
|
||
|
class LK001UpdateFriendRequestStatusStorageTest : XCTestCase {
|
||
|
|
||
|
private var storage: OWSPrimaryStorage { OWSPrimaryStorage.shared() }
|
||
|
|
||
|
override func setUp() {
|
||
|
super.setUp()
|
||
|
// Activate the mock environment
|
||
|
ClearCurrentAppContextForTests()
|
||
|
SetCurrentAppContext(TestAppContext())
|
||
|
MockSSKEnvironment.activate()
|
||
|
// Register a mock user
|
||
|
let identityManager = OWSIdentityManager.shared()
|
||
|
let seed = Randomness.generateRandomBytes(16)!
|
||
|
let keyPair = Curve25519.generateKeyPair(fromSeed: seed + seed)
|
||
|
let databaseConnection = identityManager.value(forKey: "dbConnection") as! YapDatabaseConnection
|
||
|
databaseConnection.setObject(keyPair, forKey: OWSPrimaryStorageIdentityKeyStoreIdentityKey, inCollection: OWSPrimaryStorageIdentityKeyStoreCollection)
|
||
|
TSAccountManager.sharedInstance().phoneNumberAwaitingVerification = keyPair.hexEncodedPublicKey
|
||
|
TSAccountManager.sharedInstance().didRegister()
|
||
|
}
|
||
|
|
||
|
func test_shouldMigrateFriendRequestStatusCorrectly() {
|
||
|
}
|
||
|
|
||
|
}
|