Skip to content

Commit b682548

Browse files
committed
Clean up usage of data manager in tests.
1 parent 9ed5432 commit b682548

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

Tests/SQLiteDataTests/CloudKitTests/AssetsTests.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
extension BaseCloudKitTests {
1313
@MainActor
1414
final class AssetsTests: BaseCloudKitTests, @unchecked Sendable {
15-
@Dependency(\.dataManager) var dataManager
16-
var inMemoryDataManager: InMemoryDataManager {
17-
dataManager as! InMemoryDataManager
18-
}
19-
2015
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
2116
@Test func basics() async throws {
2217
try await userDatabase.userWrite { db in

Tests/SQLiteDataTests/CloudKitTests/SchemaChangeTests.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99

1010
extension BaseCloudKitTests {
1111
final class SchemaChangeTests: BaseCloudKitTests, @unchecked Sendable {
12-
@Dependency(\.dataManager) var dataManager
13-
var inMemoryDataManager: InMemoryDataManager {
14-
dataManager as! InMemoryDataManager
15-
}
16-
1712
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
1813
@Test func addColumnToRemindersAndRemindersLists() async throws {
1914
let personalList = RemindersList(id: 1, title: "Personal")

Tests/SQLiteDataTests/Internal/BaseCloudKitTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ class BaseCloudKitTests: @unchecked Sendable {
1919
private let _container: any Sendable
2020

2121
@Dependency(\.currentTime.now) var now
22+
@Dependency(\.dataManager) var dataManager
23+
var inMemoryDataManager: InMemoryDataManager {
24+
dataManager as! InMemoryDataManager
25+
}
2226

2327
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
2428
var container: MockCloudContainer {

0 commit comments

Comments
 (0)