Files
ncd-fe/packages/pl-fe/src/features/ui/components/subscribe-button.test.tsx
marcin mikołajczak 966b04fdf0 Call it pl-fe internally
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-08-28 13:41:08 +02:00

27 lines
732 B
TypeScript

import React from 'react';
import { buildAccount, buildRelationship } from 'pl-fe/jest/factory';
import { render, screen } from 'pl-fe/jest/test-helpers';
import SubscribeButton from './subscription-button';
const justin = {
id: '1',
acct: 'justin-username',
display_name: 'Justin L',
avatar: 'test.jpg',
};
describe('<SubscribeButton />', () => {
let store: any;
describe('with "accountNotifies" disabled', () => {
it('renders nothing', () => {
const account = buildAccount({ ...justin, relationship: buildRelationship({ following: true }) });
render(<SubscribeButton account={account} />, undefined, store);
expect(screen.queryAllByTestId('icon-button')).toHaveLength(0);
});
});
});