Skip to content

Commit

Permalink
test/polish-unit-tests: polishing unit tests (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
BEdev24 authored Aug 6, 2024
1 parent 6241624 commit c285d8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions backend/src/auth/service/auth.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ describe('AuthService', () => {
permissions: [],
createdAt: null,
updatedAt: null,
deactivatedAt: null,
};

const mockConfigService = {
Expand Down
9 changes: 4 additions & 5 deletions backend/src/governance/facade/governance.facade.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ describe('GovernanceFacade', () => {
permissions: [],
createdAt: null,
updatedAt: null,
deactivatedAt: null,
},
{
id: 'mockedId2',
Expand All @@ -51,6 +52,7 @@ describe('GovernanceFacade', () => {
permissions: [],
createdAt: null,
updatedAt: null,
deactivatedAt: null,
},
];

Expand Down Expand Up @@ -421,7 +423,7 @@ describe('GovernanceFacade', () => {
const userId = 'user_1';
const proposalId = mockGovActionProposalDtos[0].id;
jest
.spyOn<any, string>(facade, 'createRationaleJson')
.spyOn<any, string>(facade, 'createRationaleJsonCip100')
.mockResolvedValueOnce(mockRationaleJson);
jest
.spyOn<any, string>(facade, 'addRationaleToIpfs')
Expand Down Expand Up @@ -458,7 +460,7 @@ describe('GovernanceFacade', () => {
govActionProposalId: proposalId,
};
jest
.spyOn<any, string>(facade, 'createRationaleJson')
.spyOn<any, string>(facade, 'createRationaleJsonCip100')
.mockResolvedValueOnce(mockRationaleJson);
jest
.spyOn<any, string>(facade, 'addRationaleToIpfs')
Expand All @@ -480,9 +482,6 @@ describe('GovernanceFacade', () => {
`Gov action proposal with id ${rationaleRequest.govActionProposalId} not found`,
);
}
expect(mockGovernanceService.findGovProposalById).toHaveBeenCalledWith(
rationaleRequest.govActionProposalId,
);
});
});

Expand Down

0 comments on commit c285d8d

Please sign in to comment.