Skip to content

Commit

Permalink
Use removeCache in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Apr 24, 2023
1 parent 436128e commit fe4a72f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/ParseCareKit/PCKUtility.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public class PCKUtility {
UserDefaults.standard.removeObject(forKey: ParseCareKitConstants.defaultACL)
UserDefaults.standard.synchronize()
}

/// Get the default ACL for `ParseCareKit` objects.
public class func getDefaultACL() -> ParseACL? {
guard let aclString = UserDefaults.standard.value(forKey: ParseCareKitConstants.defaultACL) as? String,
Expand Down
3 changes: 1 addition & 2 deletions Tests/ParseCareKitTests/EncodingCareKitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ class ParseCareKitTests: XCTestCase {
try await KeychainStore.shared.deleteAll()
try await ParseStorage.shared.deleteAll()
try store.delete()
UserDefaults.standard.removeObject(forKey: ParseCareKitConstants.defaultACL)
UserDefaults.standard.synchronize()
PCKUtility.removeCache()
}

func testSetDefaultACLLoggedIn() async throws {
Expand Down
3 changes: 1 addition & 2 deletions Tests/ParseCareKitTests/UtilityTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ class UtilityTests: XCTestCase {
MockURLProtocol.removeAll()
try await KeychainStore.shared.deleteAll()
try await ParseStorage.shared.deleteAll()
UserDefaults.standard.removeObject(forKey: ParseCareKitConstants.defaultACL)
UserDefaults.standard.synchronize()
PCKUtility.removeCache()
}

func testSetupServer() async throws {
Expand Down

0 comments on commit fe4a72f

Please sign in to comment.