Skip to content

Commit

Permalink
remove obsolete tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Velin92 committed Oct 9, 2024
1 parent 9d1ba61 commit 611a906
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions RiotTests/UserSessionsDataProviderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 611a906

Please sign in to comment.