1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Improved test unit

This commit is contained in:
Laurent Cozic 2017-07-02 22:01:37 +01:00
parent 8f5219fb79
commit 09bcf8df35
2 changed files with 8 additions and 0 deletions

View File

@ -385,6 +385,10 @@ describe('Synchronizer', function() {
expect(conflictedNotes.length).toBe(1);
expect(conflictedNotes[0].title).toBe(newTitle);
let unconflictedNotes = await Note.unconflictedNotes();
expect(unconflictedNotes.length).toBe(0);
done();
});

View File

@ -88,6 +88,10 @@ class Note extends BaseItem {
return this.modelSelectAll('SELECT * FROM notes WHERE is_conflict = 1');
}
static unconflictedNotes() {
return this.modelSelectAll('SELECT * FROM notes WHERE is_conflict = 0');
}
static updateGeolocation(noteId) {
Log.info('Updating lat/long of note ' + noteId);