Skip to content

Commit

Permalink
fix avatar form spec file
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgraham4401 committed Aug 31, 2024
1 parent a3af05c commit af7b3b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions client/app/features/profile/components/AvatarForm.spec.tsx
Original file line number Diff line number Diff line change
@@ -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(<AvatarForm />);
renderWithProviders(<AvatarForm />);
expect(screen.getByRole('button')).toBeInTheDocument();
});
});
1 change: 0 additions & 1 deletion client/app/features/profile/components/AvatarForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down

0 comments on commit af7b3b7

Please sign in to comment.