@@ -59,8 +59,8 @@ final class AttachmentTests: XCTestCase {
5959 return MockRemoteStorage ( )
6060 } ( ) ,
6161 attachmentsDirectory: getAttachmentDirectory ( ) ,
62- watchAttachments: { [ database] in
63- try database! . watch ( options: WatchOptions (
62+ watchAttachments: { [ database = database! ] in
63+ try database. watch ( options: WatchOptions (
6464 sql: " SELECT photo_id FROM users WHERE photo_id IS NOT NULL " ,
6565 mapper: { cursor in try WatchedAttachmentItem (
6666 id: cursor. getString ( name: " photo_id " ) ,
@@ -81,7 +81,7 @@ final class AttachmentTests: XCTestCase {
8181 )
8282
8383 let attachmentRecord = try await waitForMatch (
84- iteratorGenerator: { [ database] in try database! . watch (
84+ iteratorGenerator: { [ database = database! ] in try database. watch (
8585 options: WatchOptions (
8686 sql: " SELECT * FROM attachments " ,
8787 mapper: { cursor in try Attachment . fromCursor ( cursor) }
@@ -132,7 +132,7 @@ final class AttachmentTests: XCTestCase {
132132 db: database,
133133 remoteStorage: mockedRemote,
134134 attachmentsDirectory: getAttachmentDirectory ( ) ,
135- watchAttachments: { [ database] in try database! . watch ( options: WatchOptions (
135+ watchAttachments: { [ database = database! ] in try database. watch ( options: WatchOptions (
136136 sql: " SELECT photo_id FROM users WHERE photo_id IS NOT NULL " ,
137137 mapper: { cursor in try WatchedAttachmentItem (
138138 id: cursor. getString ( name: " photo_id " ) ,
@@ -155,8 +155,8 @@ final class AttachmentTests: XCTestCase {
155155 }
156156
157157 _ = try await waitForMatch (
158- iteratorGenerator: { [ database] in
159- try database! . watch (
158+ iteratorGenerator: { [ database = database! ] in
159+ try database. watch (
160160 options: WatchOptions (
161161 sql: " SELECT * FROM attachments " ,
162162 mapper: { cursor in try Attachment . fromCursor ( cursor) }
0 commit comments