mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
always call tear down (#1909)
This commit is contained in:
@@ -25,7 +25,7 @@ class AnalyticsSettingsScreenViewModelTests: XCTestCase {
|
|||||||
private var context: AnalyticsSettingsScreenViewModelType.Context!
|
private var context: AnalyticsSettingsScreenViewModelType.Context!
|
||||||
|
|
||||||
override func tearDown() {
|
override func tearDown() {
|
||||||
appSettings.analyticsConsentState = .unknown
|
AppSettings.reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor override func setUpWithError() throws {
|
@MainActor override func setUpWithError() throws {
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ class AnalyticsTests: XCTestCase {
|
|||||||
bugReportService: ServiceLocator.shared.bugReportService))
|
bugReportService: ServiceLocator.shared.bugReportService))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func tearDown() {
|
||||||
|
AppSettings.reset()
|
||||||
|
}
|
||||||
|
|
||||||
func testAnalyticsPromptNewUser() {
|
func testAnalyticsPromptNewUser() {
|
||||||
// Given a fresh install of the app (without PostHog analytics having been set).
|
// Given a fresh install of the app (without PostHog analytics having been set).
|
||||||
// When the user is prompted for analytics.
|
// When the user is prompted for analytics.
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ class ComposerToolbarViewModelTests: XCTestCase {
|
|||||||
mentionDisplayHelper: ComposerMentionDisplayHelper.mock)
|
mentionDisplayHelper: ComposerMentionDisplayHelper.mock)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func tearDown() {
|
||||||
|
AppSettings.reset()
|
||||||
|
}
|
||||||
|
|
||||||
func testComposerFocus() {
|
func testComposerFocus() {
|
||||||
viewModel.process(roomAction: .setMode(mode: .edit(originalItemId: TimelineItemIdentifier(timelineID: "mock"))))
|
viewModel.process(roomAction: .setMode(mode: .edit(originalItemId: TimelineItemIdentifier(timelineID: "mock"))))
|
||||||
XCTAssertTrue(viewModel.state.bindings.composerFocused)
|
XCTAssertTrue(viewModel.state.bindings.composerFocused)
|
||||||
|
|||||||
Reference in New Issue
Block a user