File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Yosemite/YosemiteTests/Stores Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -332,14 +332,16 @@ class NotificationStoreTests: XCTestCase {
332332
333333 network. simulateResponse ( requestUrlSuffix: " notifications/read " , filename: " generic_success " )
334334
335- let action = NotificationAction . updateMultipleReadStatus ( noteIds: [ originalNote. noteId] , read: true ) { [ weak self] ( error) in
336- let storageNote = self ? . viewStorage. loadNotification ( noteID: originalNote. noteId)
337- XCTAssertEqual ( storageNote? . toReadOnly ( ) . read, expectedNote. read)
335+ // Mark as Read
336+ let action = NotificationAction . updateMultipleReadStatus ( noteIds: [ originalNote. noteId] , read: true ) { error in
338337 XCTAssertNil ( error)
339338
339+ let reloadedNote = self . viewStorage. loadNotification ( noteID: originalNote. noteId) ? . toReadOnly ( )
340+ XCTAssertEqual ( reloadedNote? . read, expectedNote. read)
340341 expectation. fulfill ( )
341342 }
342343
344+ // Insert the Note
343345 XCTAssertEqual ( viewStorage. countObjects ( ofType: Storage . Note. self) , 0 )
344346 noteStore. updateLocalNotes ( with: [ originalNote] ) { [ weak self] in
345347 XCTAssertEqual ( self ? . viewStorage. countObjects ( ofType: Storage . Note. self) , 1 )
You can’t perform that action at this time.
0 commit comments