7383-testToMaster #370

Merged
alexm merged 365 commits from 7383-testToMaster into master 2024-05-14 05:46:56 +00:00
1 changed files with 0 additions and 33 deletions
Showing only changes of commit f2d0d3f3ff - Show all commits

View File

@ -1,33 +0,0 @@
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
import { createWrapper, axios } from 'app/test/vitest/helper';
import AgencyWorkCenter from 'pages/Agency/Card/AgencyWorkcenter.vue';
describe('AgencyWorkCenter', () => {
let vm;
beforeAll(() => {
vm = createWrapper(AgencyWorkCenter, {
global: {
claim: {
id: 1,
},
},
}).vm;
});
afterEach(() => {
vi.clearAllMocks();
});
describe('remove()', () => {
it('should delete the AgencyMode', async () => {
vi.spyOn(axios, 'delete').mockResolvedValue({ data: true });
vi.spyOn(vm.quasar, 'notify');
await vm.deleteWorCenter(1);
expect(vm.quasar.notify).toHaveBeenCalledWith(
expect.objectContaining({ type: 'positive' })
);
});
});
});