Skip to content

Commit

Permalink
effective call number test case
Browse files Browse the repository at this point in the history
  • Loading branch information
manvendra-s-rathore committed Feb 6, 2024
1 parent 3bb23b9 commit 88fb14b
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import okapiCurrentUser from 'fixtures/okapiCurrentUser';
import loan from 'fixtures/openLoan';
import getListDataFormatter from './getListDataFormatter';
import { effectiveCallNumber } from '@folio/stripes/util';

const STRIPES = {
connect: (Component) => Component,
Expand Down Expand Up @@ -49,6 +50,10 @@ const formatMessageMock = jest.fn();
const contributorsMock = jest.fn(() => ['test', 'test2', 'test3']);
const getFeeFineMock = jest.fn();

jest.mock('@folio/stripes/util', () => ({
effectiveCallNumber: jest.fn(),
}));

const formatMessage = formatMessageMock;
const toggleItem = jest.fn();
const isLoanChecked = jest.fn();
Expand Down Expand Up @@ -113,6 +118,15 @@ describe('Data Formatter component', () => {
data.contributors.formatter(loan);
expect(contributorsMock).toHaveBeenCalled();
});
it('Checking Call Number', async () => {
const data = getListDataFormatter(formatMessage, toggleItem, isLoanChecked, requestCounts,
requestRecords, resources, getLoanPolicy, handleOptionsChange, stripes, getFeeFine,
getContributorslist, feeFineCount, user);
data.callNumber.sorter(loan);
data.callNumber.formatter(loan);
expect(effectiveCallNumber).toHaveBeenCalled();

});
it('Checking renewals', async () => {
const data = getListDataFormatter(formatMessage, toggleItem, isLoanChecked, requestCounts,
requestRecords, resources, getLoanPolicy, handleOptionsChange, stripes, getFeeFine,
Expand Down

0 comments on commit 88fb14b

Please sign in to comment.