From 4bfffebb32efaa54d68e016c12ac61284247b961 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 18 Apr 2022 16:04:58 -0500 Subject: [PATCH] Normalize accounts in who-to-follow-panel.test.tsx --- .../__tests__/who-to-follow-panel.test.tsx | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/app/soapbox/features/ui/components/__tests__/who-to-follow-panel.test.tsx b/app/soapbox/features/ui/components/__tests__/who-to-follow-panel.test.tsx index 700eb621f..92123eb24 100644 --- a/app/soapbox/features/ui/components/__tests__/who-to-follow-panel.test.tsx +++ b/app/soapbox/features/ui/components/__tests__/who-to-follow-panel.test.tsx @@ -2,16 +2,17 @@ import { Map as ImmutableMap, fromJS } from 'immutable'; import React from 'react'; import { render, screen } from '../../../../jest/test-helpers'; +import { normalizeAccount } from '../../../../normalizers'; import WhoToFollowPanel from '../who-to-follow-panel'; describe('', () => { it('renders suggested accounts', () => { const store = { accounts: ImmutableMap({ - '1': ImmutableMap({ + '1': normalizeAccount({ id: '1', acct: 'username', - display_name_html: 'My name', + display_name: 'My name', avatar: 'test.jpg', }), }), @@ -30,16 +31,16 @@ describe('', () => { it('renders multiple accounts', () => { const store = { accounts: ImmutableMap({ - '1': ImmutableMap({ + '1': normalizeAccount({ id: '1', acct: 'username', - display_name_html: 'My name', + display_name: 'My name', avatar: 'test.jpg', }), - '2': ImmutableMap({ + '2': normalizeAccount({ id: '1', acct: 'username2', - display_name_html: 'My other name', + display_name: 'My other name', avatar: 'test.jpg', }), }), @@ -64,16 +65,16 @@ describe('', () => { it('respects the limit prop', () => { const store = { accounts: ImmutableMap({ - '1': ImmutableMap({ + '1': normalizeAccount({ id: '1', acct: 'username', - display_name_html: 'My name', + display_name: 'My name', avatar: 'test.jpg', }), - '2': ImmutableMap({ + '2': normalizeAccount({ id: '1', acct: 'username2', - display_name_html: 'My other name', + display_name: 'My other name', avatar: 'test.jpg', }), }), @@ -98,16 +99,16 @@ describe('', () => { it('renders empty', () => { const store = { accounts: ImmutableMap({ - '1': ImmutableMap({ + '1': normalizeAccount({ id: '1', acct: 'username', - display_name_html: 'My name', + display_name: 'My name', avatar: 'test.jpg', }), - '2': ImmutableMap({ + '2': normalizeAccount({ id: '1', acct: 'username2', - display_name_html: 'My other name', + display_name: 'My other name', avatar: 'test.jpg', }), }),