1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-08 23:07:32 +02:00

Desktop: Fixed getting geolocation for new notes

This commit is contained in:
Laurent Cozic
2022-04-26 13:22:43 +01:00
parent 8abdbfe2bd
commit 86179bd74c
6 changed files with 95 additions and 28 deletions

View File

@@ -63,7 +63,12 @@ describe('models/BaseItem', function() {
expect(unserialized.longitude).toEqual('0.00000000');
expect(unserialized.altitude).toEqual('0.0000');
await Note.updateGeolocation(note.id);
await Note.save({
id: note.id,
longitude: -3.459,
altitude: 0,
latitude: 48.732,
});
note = await Note.load(note.id);
serialized = await Note.serialize(note);
@@ -77,7 +82,12 @@ describe('models/BaseItem', function() {
it('should serialize and unserialize notes', (async () => {
const folder = await Folder.save({ title: 'folder' });
const note = await Note.save({ title: 'note', parent_id: folder.id });
await Note.updateGeolocation(note.id);
await Note.save({
id: note.id,
longitude: -3.459,
altitude: 0,
latitude: 48.732,
});
const noteBefore = await Note.load(note.id);
const serialized = await Note.serialize(noteBefore);