From 64df93f5a0d15a8737efd6102556b071b366eba4 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 26 Jun 2023 12:41:42 -0500 Subject: [PATCH] Fix status test --- app/soapbox/components/__tests__/status.test.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/soapbox/components/__tests__/status.test.tsx b/app/soapbox/components/__tests__/status.test.tsx index ea9d04d98..d2ec39ca2 100644 --- a/app/soapbox/components/__tests__/status.test.tsx +++ b/app/soapbox/components/__tests__/status.test.tsx @@ -1,12 +1,14 @@ import React from 'react'; -import { render, screen, rootState } from '../../jest/test-helpers'; -import { normalizeStatus, normalizeAccount } from '../../normalizers'; +import { buildAccount } from 'soapbox/jest/factory'; +import { render, screen, rootState } from 'soapbox/jest/test-helpers'; +import { normalizeStatus } from 'soapbox/normalizers'; + import Status from '../status'; import type { ReducerStatus } from 'soapbox/reducers/statuses'; -const account = normalizeAccount({ +const account = buildAccount({ id: '1', acct: 'alex', }); @@ -34,7 +36,7 @@ describe('', () => { }); it('is not rendered if status is under review', () => { - const inReviewStatus = normalizeStatus({ ...status, visibility: 'self' }); + const inReviewStatus = status.set('visibility', 'self'); render(, undefined, state); expect(screen.queryAllByTestId('status-action-bar')).toHaveLength(0); });