Files
iNaturalistReactNative/tests/factories/LocalObservationPhoto.js
Ken-ichi a7a2e1c10f Show up-to-date metadata for observations immediately after upload (#1497)
This fetches a remote copy of each observation after upload to make sure the
client has the freshest copy of the data immediately.
2024-05-06 17:50:46 -07:00

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 )
} )
} );