@@ -148,7 +148,7 @@ class ContextManagerTests: XCTestCase {
148148 }
149149 XCTAssertEqual ( numberOfAccounts ( ) , 0 )
150150
151- await contextManager. save { context in
151+ await contextManager. performAndSave { context in
152152 let account = WPAccount ( context: context)
153153 account. userID = 1
154154 account. username = " First User "
@@ -163,7 +163,7 @@ class ContextManagerTests: XCTestCase {
163163 // From: https://github.com/apple/swift-evolution/blob/main/proposals/0296-async-await.md#overloading-and-overload-resolution
164164 // > "In non-async functions, and closures without any await expression, the compiler selects the non-async overload"
165165 let sync : ( ) -> Void = {
166- contextManager. save { context in
166+ contextManager. performAndSave { context in
167167 let account = WPAccount ( context: context)
168168 account. userID = 2
169169 account. username = " Second User "
@@ -187,12 +187,12 @@ class ContextManagerTests: XCTestCase {
187187 self . expectation ( description: " Second User is saved " ) ,
188188 ]
189189
190- contextManager. save {
190+ contextManager. performAndSave {
191191 let account = WPAccount ( context: $0)
192192 account. userID = 1
193193 account. username = " First User "
194194
195- contextManager. save {
195+ contextManager. performAndSave {
196196 let account = WPAccount ( context: $0)
197197 account. userID = 2
198198 account. username = " Second User "
0 commit comments