Skip to content

Commit a31e5dc

Browse files
committed
fix: test pull remote changes
Signed-off-by: alperozturk <alper_ozturk@proton.me>
1 parent 56fdbf5 commit a31e5dc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesServerSyncTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private boolean pullRemoteChanges() {
226226
return false;
227227
}
228228

229-
final var fetchResponse = notesAPI.getNotes(localAccount.getModified(), localAccount.getETag()).blockingSingle();
229+
final var fetchResponse = notesAPI.getNotes(modified, localAccount.getETag()).blockingSingle();
230230
final var remoteNotes = fetchResponse.getResponse();
231231
final var remoteIDs = new HashSet<Long>();
232232
// pull remote changes: update or create each remote note

app/src/test/java/it/niedermann/owncloud/notes/persistence/NotesServerSyncTaskTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public void testPushLocalChanges() {
8888

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

0 commit comments

Comments
 (0)