Browse Source

Update AppDelegateTests.swift

master
Abhi 2 years ago
parent
commit
d52ac51aaf
  1. 8
      Clocker/ClockerUnitTests/AppDelegateTests.swift

8
Clocker/ClockerUnitTests/AppDelegateTests.swift

@ -102,7 +102,9 @@ class AppDelegateTests: XCTestCase {
timezone1.formattedAddress = "MenubarTimezone" timezone1.formattedAddress = "MenubarTimezone"
timezone1.isFavourite = 1 timezone1.isFavourite = 1
// Encode it in UserDefaults // Encode it in UserDefaults
let encodedTimezone = NSKeyedArchiver.clocker_archive(with: timezone1) guard let encodedTimezone = NSKeyedArchiver.clocker_archive(with: timezone1) else {
return
}
DataStore.shared().setTimezones([encodedTimezone]) DataStore.shared().setTimezones([encodedTimezone])
subject?.setupMenubarTimer() subject?.setupMenubarTimer()
@ -131,7 +133,9 @@ class AppDelegateTests: XCTestCase {
timezone1.formattedAddress = "MenubarTimezone" timezone1.formattedAddress = "MenubarTimezone"
timezone1.isFavourite = 1 timezone1.isFavourite = 1
// Encode it in UserDefaults // Encode it in UserDefaults
let encodedTimezone = NSKeyedArchiver.clocker_archive(with: timezone1) guard let encodedTimezone = NSKeyedArchiver.clocker_archive(with: timezone1) else {
return
}
DataStore.shared().setTimezones([encodedTimezone]) DataStore.shared().setTimezones([encodedTimezone])
subject?.setupMenubarTimer() subject?.setupMenubarTimer()

Loading…
Cancel
Save