mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-05-05 06:05:12 -04:00
This fetches a remote copy of each observation after upload to make sure the client has the freshest copy of the data immediately.
19 lines
498 B
JavaScript
19 lines
498 B
JavaScript
import { define } from "factoria";
|
|
import { toJSON } from "tests/helpers/factoria";
|
|
|
|
import photoFactory from "./LocalPhoto";
|
|
|
|
export default define( "LocalObservationPhoto", faker => ( {
|
|
uuid: faker.string.uuid( ),
|
|
photo: photoFactory( "LocalPhoto" ),
|
|
wasSynced: jest.fn( ( ) => false ),
|
|
needsSync: jest.fn( ( ) => true ),
|
|
toJSON
|
|
} ), {
|
|
uploaded: faker => ( {
|
|
_synced_at: faker.date.past( ),
|
|
needsSync: jest.fn( ( ) => false ),
|
|
wasSynced: jest.fn( ( ) => true )
|
|
} )
|
|
} );
|