diff --git a/Clocker/ClockerUnitTests/ClockerUnitTests.swift b/Clocker/ClockerUnitTests/ClockerUnitTests.swift index ad596c2..21cca39 100644 --- a/Clocker/ClockerUnitTests/ClockerUnitTests.swift +++ b/Clocker/ClockerUnitTests/ClockerUnitTests.swift @@ -430,9 +430,9 @@ class ClockerUnitTests: XCTestCase { XCTAssertEqual(subject.subviews.count, 2) // Two textfields XCTAssertEqual(subject.subviews.first?.layer?.animationKeys(), ["notimezone.emoji"]) } - + func testDefaultsWiping() { - let defaultsDict: [String: Any] = ["test1" : "testString", "test2": 24] + let defaultsDict: [String: Any] = ["test1": "testString", "test2": 24] let domainName = "com.test.clocker" let defaults = UserDefaults(suiteName: domainName) defaults?.setPersistentDomain(defaultsDict, forName: domainName) @@ -440,5 +440,4 @@ class ClockerUnitTests: XCTestCase { XCTAssertNil(defaults?.object(forKey: "test1")) XCTAssertNil(defaults?.object(forKey: "test2")) } - } diff --git a/Clocker/Overall App/AppDefaults.swift b/Clocker/Overall App/AppDefaults.swift index 7224c48..558ed05 100644 --- a/Clocker/Overall App/AppDefaults.swift +++ b/Clocker/Overall App/AppDefaults.swift @@ -51,12 +51,6 @@ class AppDefaults { } } -extension String { - func localized() -> String { - return NSLocalizedString(self, comment: "Title for \(self)") - } -} - extension UserDefaults { // Use this with caution. Exposing this for debugging purposes only. func wipe(for bundleID: String) { diff --git a/Clocker/Overall App/String + Additions.swift b/Clocker/Overall App/String + Additions.swift index 9095ba6..c28c0c3 100644 --- a/Clocker/Overall App/String + Additions.swift +++ b/Clocker/Overall App/String + Additions.swift @@ -14,4 +14,8 @@ extension String { return filteredAddress } + + func localized() -> String { + return NSLocalizedString(self, comment: "Title for \(self)") + } }