From edc32a55ef1816c01613d7125b319008f6c9fe34 Mon Sep 17 00:00:00 2001 From: Salim Braksa Date: Sat, 3 Feb 2024 20:56:04 +0100 Subject: [PATCH] Fix unit tests --- .../BooleanUserDefaultsDebugViewModelTests.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/WordPress/WordPressTest/Me/App Settings/Boolean User Defaults/BooleanUserDefaultsDebugViewModelTests.swift b/WordPress/WordPressTest/Me/App Settings/Boolean User Defaults/BooleanUserDefaultsDebugViewModelTests.swift index cc0a1145e8e9..054127fa7a70 100644 --- a/WordPress/WordPressTest/Me/App Settings/Boolean User Defaults/BooleanUserDefaultsDebugViewModelTests.swift +++ b/WordPress/WordPressTest/Me/App Settings/Boolean User Defaults/BooleanUserDefaultsDebugViewModelTests.swift @@ -128,7 +128,9 @@ class BooleanUserDefaultsDebugViewModelTests: CoreDataTestCase { viewModel.load() // When - viewModel.updateUserDefault(false, forSection: "Other", forRow: "entry1") + let section = viewModel.userDefaultsSections[0] + let row = section.rows[0] + viewModel.updateUserDefault(false, section: section, row: row) // Then XCTAssertTrue(viewModel.userDefaultsSections.count == 1) @@ -145,7 +147,9 @@ class BooleanUserDefaultsDebugViewModelTests: CoreDataTestCase { viewModel.load() // When - viewModel.updateUserDefault(false, forSection: "section1", forRow: "entry1") + let section = viewModel.userDefaultsSections[0] + let row = section.rows[0] + viewModel.updateUserDefault(false, section: section, row: row) // Then XCTAssertTrue(viewModel.userDefaultsSections.count == 1)