mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 15:09:31 +02:00
remove obsolete tests
This commit is contained in:
@@ -10,22 +10,6 @@ import XCTest
|
||||
@testable import Element
|
||||
|
||||
class UserSessionCardViewDataTests: XCTestCase {
|
||||
func testOtherSessionsWithCrossSigning() {
|
||||
// Given a data provider for a session that can cross sign.
|
||||
let mxSession = MockSession(canCrossSign: true)
|
||||
let dataProvider = UserSessionsDataProvider(session: mxSession)
|
||||
|
||||
// When the verification state of other sessions is requested.
|
||||
let deviceA = MockDeviceInfo(deviceID: .otherDeviceA, verified: true)
|
||||
let deviceB = MockDeviceInfo(deviceID: .otherDeviceB, verified: false)
|
||||
let verificationStateA = dataProvider.verificationState(for: deviceA)
|
||||
let verificationStateB = dataProvider.verificationState(for: deviceB)
|
||||
|
||||
// Then they should match the verification state from the device info.
|
||||
XCTAssertEqual(verificationStateA, .verified)
|
||||
XCTAssertEqual(verificationStateB, .unverified)
|
||||
}
|
||||
|
||||
func testOtherSessionsWithoutCrossSigning() {
|
||||
// Given a data provider for a session that can't cross sign.
|
||||
let mxSession = MockSession(canCrossSign: false)
|
||||
@@ -42,38 +26,6 @@ class UserSessionCardViewDataTests: XCTestCase {
|
||||
XCTAssertEqual(verificationStateB, .unknown)
|
||||
}
|
||||
|
||||
func testCurrentDeviceWithCrossSigning() {
|
||||
// Given a data provider for a session that can cross sign.
|
||||
let mxSession = MockSession(canCrossSign: true)
|
||||
let dataProvider = UserSessionsDataProvider(session: mxSession)
|
||||
|
||||
// When the verification state of the same session is requested.
|
||||
let currentDeviceVerified = MockDeviceInfo(deviceID: .currentDevice, verified: true)
|
||||
let currentDeviceUnverified = MockDeviceInfo(deviceID: .currentDevice, verified: false)
|
||||
let verificationStateVerified = dataProvider.verificationState(for: currentDeviceVerified)
|
||||
let verificationStateUnverified = dataProvider.verificationState(for: currentDeviceUnverified)
|
||||
|
||||
// Then the verification state should be unknown.
|
||||
XCTAssertEqual(verificationStateVerified, .verified)
|
||||
XCTAssertEqual(verificationStateUnverified, .unverified)
|
||||
}
|
||||
|
||||
func testCurrentDeviceWithoutCrossSigning() {
|
||||
// Given a data provider for a session that can't cross sign.
|
||||
let mxSession = MockSession(canCrossSign: false)
|
||||
let dataProvider = UserSessionsDataProvider(session: mxSession)
|
||||
|
||||
// When the verification state of the same session is requested.
|
||||
let currentDeviceVerified = MockDeviceInfo(deviceID: .currentDevice, verified: true)
|
||||
let currentDeviceUnverified = MockDeviceInfo(deviceID: .currentDevice, verified: false)
|
||||
let verificationStateVerified = dataProvider.verificationState(for: currentDeviceVerified)
|
||||
let verificationStateUnverified = dataProvider.verificationState(for: currentDeviceUnverified)
|
||||
|
||||
// Then the verification state should be unknown.
|
||||
XCTAssertEqual(verificationStateVerified, .unverified)
|
||||
XCTAssertEqual(verificationStateUnverified, .unverified)
|
||||
}
|
||||
|
||||
func testDeviceNotHavingCryptoSupportOnVerifiedDevice() {
|
||||
let mxSession = MockSession(canCrossSign: true)
|
||||
let dataProvider = UserSessionsDataProvider(session: mxSession)
|
||||
|
||||
Reference in New Issue
Block a user