From af7b3b7436543db5083c09fc2e484048f8cf30cc Mon Sep 17 00:00:00 2001 From: David Graham Date: Fri, 30 Aug 2024 23:16:53 -0400 Subject: [PATCH] fix avatar form spec file --- client/app/features/profile/components/AvatarForm.spec.tsx | 5 +++-- client/app/features/profile/components/AvatarForm.tsx | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/app/features/profile/components/AvatarForm.spec.tsx b/client/app/features/profile/components/AvatarForm.spec.tsx index 77e6b004..046c00ee 100644 --- a/client/app/features/profile/components/AvatarForm.spec.tsx +++ b/client/app/features/profile/components/AvatarForm.spec.tsx @@ -1,10 +1,11 @@ -import { render, screen } from '@testing-library/react'; +import { screen } from '@testing-library/react'; import { describe, expect, it } from 'vitest'; +import { renderWithProviders } from '~/mocks'; import { AvatarForm } from './AvatarForm'; describe('AvatarForm Component', () => { it('avatar image is a button', () => { - render(); + renderWithProviders(); expect(screen.getByRole('button')).toBeInTheDocument(); }); }); diff --git a/client/app/features/profile/components/AvatarForm.tsx b/client/app/features/profile/components/AvatarForm.tsx index bb73ff06..663f8c78 100644 --- a/client/app/features/profile/components/AvatarForm.tsx +++ b/client/app/features/profile/components/AvatarForm.tsx @@ -19,7 +19,6 @@ export function AvatarForm({ avatar }: AvatarFormProps) { const onSubmit = (data: any) => { const formData = new FormData(); formData.append('avatar', data.avatar[0]); - console.log('data ', formData); htApi .patch(`/profile/${user?.id}`, formData, { headers: { 'Content-Type': 'multipart/form-data' },