mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 18:54:17 +00:00
fix(atlas): reconcile offline country and region changes together
Keep country and region reads in step with queued writes and with the mark source held by the server. Reconcile a delete already applied elsewhere before removing it from the account queue.
This commit is contained in:
@@ -90,6 +90,7 @@ describe('VisitedCountriesRepository: countries that came in through a region (#
|
||||
|
||||
expect((await findRow(t, VisitedCountries, { user: user.id, country_code: 'NO' }))?.source).toBe('region');
|
||||
expect(await repo.findSource(user.id, 'NO')).toEqual({ source: 'manual' });
|
||||
expect(await repo.listMarksForUser(user.id)).toEqual([{ country_code: 'NO', source: 'region' }]);
|
||||
expect((await repo.listForUser(user.id)).map((r) => r.source)).toEqual(['manual']);
|
||||
expect(await repo.hasOwnMark(user.id, 'NO')).toBe(false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user