From a529389ddf527cbfdbe0041e5dbdf68844d9af89 Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 14 Jul 2022 15:12:37 +0100 Subject: [PATCH] Fix Riot tests. --- .../Authentication/AuthenticationServiceTests.swift | 4 ---- RiotTests/OnboardingTests.swift | 12 ------------ 2 files changed, 16 deletions(-) diff --git a/RiotTests/Modules/Authentication/AuthenticationServiceTests.swift b/RiotTests/Modules/Authentication/AuthenticationServiceTests.swift index db499be208..5d9cae5bbb 100644 --- a/RiotTests/Modules/Authentication/AuthenticationServiceTests.swift +++ b/RiotTests/Modules/Authentication/AuthenticationServiceTests.swift @@ -250,7 +250,6 @@ import XCTest // Then the view data should correctly represent the homeserver. XCTAssertEqual(viewData.address, "matrix.org", "The displayed address should match the address supplied by the user, but without the scheme.") - XCTAssertEqual(viewData.isMatrixDotOrg, true, "The server should be detected as matrix.org.") XCTAssertTrue(viewData.showLoginForm, "The login form should be shown.") XCTAssertEqual(viewData.ssoIdentityProviders, ssoIdentityProviders, "The sso identity providers should match.") XCTAssertTrue(viewData.showRegistrationForm, "The registration form should be shown.") @@ -270,7 +269,6 @@ import XCTest // Then the view data should correctly represent the homeserver. XCTAssertEqual(viewData.address, "example.com", "The displayed address should match the address supplied by the user, but without the scheme.") - XCTAssertEqual(viewData.isMatrixDotOrg, false, "The server should not be detected as matrix.org.") XCTAssertTrue(viewData.showLoginForm, "The login form should be shown.") XCTAssertEqual(viewData.ssoIdentityProviders, [], "There shouldn't be any sso identity providers.") XCTAssertFalse(viewData.showRegistrationForm, "The registration form should not be shown.") @@ -291,7 +289,6 @@ import XCTest // Then the view data should correctly represent the homeserver. XCTAssertEqual(viewData.address, "company.com", "The displayed address should match the address supplied by the user, but without the scheme.") - XCTAssertEqual(viewData.isMatrixDotOrg, false, "The server should not be detected as matrix.org.") XCTAssertFalse(viewData.showLoginForm, "The login form should not be shown.") XCTAssertEqual(viewData.ssoIdentityProviders, ssoIdentityProviders, "The sso identity providers should match.") XCTAssertFalse(viewData.showRegistrationForm, "The registration form should not be shown.") @@ -311,7 +308,6 @@ import XCTest // Then the view data should correctly represent the homeserver. XCTAssertEqual(viewData.address, "http://localhost:8008", "The displayed address should match address supplied by the user, complete with the scheme.") - XCTAssertEqual(viewData.isMatrixDotOrg, false, "The server should not be detected as matrix.org.") XCTAssertTrue(viewData.showLoginForm, "The login form should be shown.") XCTAssertEqual(viewData.ssoIdentityProviders, [], "There shouldn't be any sso identity providers.") XCTAssertTrue(viewData.showRegistrationForm, "The registration form should be shown.") diff --git a/RiotTests/OnboardingTests.swift b/RiotTests/OnboardingTests.swift index 4c43fd0bde..8597a174f7 100644 --- a/RiotTests/OnboardingTests.swift +++ b/RiotTests/OnboardingTests.swift @@ -58,18 +58,6 @@ class OnboardingTests: XCTestCase { XCTAssertEqual(properties.useCase, .skipped) } - func testCustomServerUseCase() { - // Given an empty set of user properties - let properties = UserSessionProperties(userId: userId) - - // When storing a custom server case result - let result = OnboardingUseCaseViewModelResult.customServer - properties.useCase = result.userSessionPropertyValue - - // Then the use case property should return nil - XCTAssertNil(properties.useCase) - } - func testUseCaseAfterDeletingProperties() { // Given a set of user properties with the Work Messaging use case let properties = UserSessionProperties(userId: userId)