|
|
@ -19,10 +19,7 @@ class StandardMenubarHandlerTests: XCTestCase { |
|
|
|
|
|
|
|
|
|
|
|
private func makeMockStore(with menubarMode: Int = 1) -> DataStore { |
|
|
|
private func makeMockStore(with menubarMode: Int = 1) -> DataStore { |
|
|
|
// Wipe all timezones from UserDefaults |
|
|
|
// Wipe all timezones from UserDefaults |
|
|
|
guard let defaults = UserDefaults(suiteName: "com.abhishek.Clocker.StandardMenubarHandlerTests") else { |
|
|
|
let defaults = UserDefaults(suiteName: "com.abhishek.Clocker.StandardMenubarHandlerTests")! |
|
|
|
XCTFail("User defaults couldn't be initialized") |
|
|
|
|
|
|
|
return DataStore.shared() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
defaults.set(menubarMode, forKey: CLMenubarCompactMode) |
|
|
|
defaults.set(menubarMode, forKey: CLMenubarCompactMode) |
|
|
|
defaults.set(0, forKey: CLShowMeetingInMenubar) |
|
|
|
defaults.set(0, forKey: CLShowMeetingInMenubar) |
|
|
|
XCTAssertNotEqual(defaults, UserDefaults.standard) |
|
|
|
XCTAssertNotEqual(defaults, UserDefaults.standard) |
|
|
|