mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-08-01 18:07:45 -04:00
Result should be valid when a project has no POFs
This commit is contained in:
@@ -500,4 +500,13 @@ describe( "validateProjectFieldsForObservation", () => {
|
||||
expect( resultBA.errors.map( e => e.projectTitle ) ).toEqual( ["Project B", "Project A"] );
|
||||
} );
|
||||
} );
|
||||
|
||||
describe( "edge cases", () => {
|
||||
it( "should be valid when no projects are passed", () => {
|
||||
const mockObservation = { observationFieldValues: [] };
|
||||
const result = validateProjectFieldsForObservation( mockObservation, [] );
|
||||
expect( result.valid ).toBe( true );
|
||||
expect( result.errors ).toEqual( [] );
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
|
||||
Reference in New Issue
Block a user