Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit a31e5dc6 authored by alperozturk's avatar alperozturk
Browse files

fix: test pull remote changes

parent 56fdbf58
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -226,7 +226,7 @@ abstract class NotesServerSyncTask extends Thread {
                return false;
            }

            final var fetchResponse = notesAPI.getNotes(localAccount.getModified(), localAccount.getETag()).blockingSingle();
            final var fetchResponse = notesAPI.getNotes(modified, localAccount.getETag()).blockingSingle();
            final var remoteNotes = fetchResponse.getResponse();
            final var remoteIDs = new HashSet<Long>();
            // pull remote changes: update or create each remote note
+1 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ public class NotesServerSyncTaskTest {

    @Test
    public void testPullRemoteChanges() {
        when(account.getModified()).thenReturn(Calendar.getInstance());
        when(repo.getAccountById(anyLong())).thenReturn(account);
        when(repo.getIdMap(anyLong())).thenReturn(Map.of(1000L, 1L, 2000L, 2L));
        when(repo.updateIfNotModifiedLocallyAndAnyRemoteColumnHasChanged(anyLong(), anyLong(), anyString(), anyBoolean(), anyString(), anyString(), anyString(), anyString())).thenReturn(1);