mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-06-22 14:38:49 -04:00
* Create ObsDetailsDefaultMode and rearrange items on top of screen * Move activity, details, and more into three different sections instead of tabs * Styling cleanup; change Activity name to Community * Fix scroll to activity item from Notifications * Add ObsDetailsDefaultMode unit tests * Show kebab menu on other users' observations
30 lines
776 B
JavaScript
30 lines
776 B
JavaScript
import FaveButton from "components/ObsDetailsDefaultMode/FaveButton";
|
|
import React from "react";
|
|
import factory from "tests/factory";
|
|
import { renderComponent } from "tests/helpers/render";
|
|
|
|
describe( "FaveButton", () => {
|
|
it( "should survive no currentUser", ( ) => {
|
|
expect(
|
|
( ) => renderComponent(
|
|
<FaveButton
|
|
observation={factory( "LocalObservation" )}
|
|
/>
|
|
)
|
|
).not.toThrow( );
|
|
} );
|
|
|
|
it( "should survive no currentUser for an observation w/ existing votes", ( ) => {
|
|
const observation = factory( "RemoteObservation", {
|
|
votes: [factory( "RemoteVote" )]
|
|
} );
|
|
expect(
|
|
( ) => renderComponent(
|
|
<FaveButton
|
|
observation={observation}
|
|
/>
|
|
)
|
|
).not.toThrow( );
|
|
} );
|
|
} );
|