Skip to content

Commit

Permalink
fix: tests updated with new hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Zorkin committed Jan 3, 2025
1 parent db2119d commit 396c402
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
useCreateUpdateInitiativeAgreement,
useInitiativeAgreement
} from '@/hooks/useInitiativeAgreement'
import { useRegExtOrgs } from '@/hooks/useOrganizations'
import { useOrganizationNames } from '@/hooks/useOrganizations'
import { useOrganizationBalance } from '@/hooks/useOrganization'
import { useTransactionMutation } from '../transactionMutation'
import { TRANSACTION_STATUSES } from '@/constants/statuses'
Expand Down Expand Up @@ -110,7 +110,7 @@ vi.mock('@fortawesome/react-fontawesome', () => ({

// Mock the hooks
vi.mock('@/hooks/useOrganizations', () => ({
useRegExtOrgs: vi.fn().mockReturnValue({
useOrganizationNames: vi.fn().mockReturnValue({
data: [
{
organizationId: 1,
Expand Down Expand Up @@ -281,7 +281,7 @@ describe('AddEditViewTransaction Component Tests', () => {
state: null
})

useRegExtOrgs.mockReturnValue({
useOrganizationNames.mockReturnValue({
data: [
{
organizationId: 1,
Expand Down Expand Up @@ -356,7 +356,7 @@ describe('AddEditViewTransaction Component Tests', () => {
mutate: vi.fn(),
isLoading: false
})
useRegExtOrgs.mockReturnValue({
useOrganizationNames.mockReturnValue({
data: [],
isLoading: false,
isFetched: true,
Expand Down Expand Up @@ -425,7 +425,7 @@ describe('AddEditViewTransaction Component Tests', () => {
isLoadingError: false
})

useRegExtOrgs.mockReturnValue({
useOrganizationNames.mockReturnValue({
data: [],
isLoading: false,
isFetched: true,
Expand Down Expand Up @@ -500,7 +500,7 @@ describe('AddEditViewTransaction Component Tests', () => {
isLoading: false
})

useRegExtOrgs.mockReturnValue({
useOrganizationNames.mockReturnValue({
data: [],
isLoading: false,
isFetched: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest'
import { TransactionDetails } from '../TransactionDetails'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { ThemeProvider } from '@mui/material'
import { useRegExtOrgs } from '@/hooks/useOrganizations'
import { useOrganizationNames } from '@/hooks/useOrganizations'
import { useOrganizationBalance } from '@/hooks/useOrganization'
import theme from '@/themes'
import { FormProvider, useForm } from 'react-hook-form'
Expand Down Expand Up @@ -65,7 +65,7 @@ describe('TransactionDetails Component', () => {
beforeEach(() => {
vi.clearAllMocks()

useRegExtOrgs.mockReturnValue({
useOrganizationNames.mockReturnValue({
data: mockOrganizations,
isLoading: false
})
Expand Down

0 comments on commit 396c402

Please sign in to comment.