deleted one test file
This commit is contained in:
parent
e519415e94
commit
152404d681
|
@ -1,40 +0,0 @@
|
||||||
import { AboutUsService } from "../client/services"
|
|
||||||
import { aboutUsResponse, aboutUsData } from "../utils/user"
|
|
||||||
|
|
||||||
describe('AboutUsService', () => {
|
|
||||||
it('should fetch AboutUs data', async () => {
|
|
||||||
jest.spyOn(global, 'fetch').mockResolvedValue({
|
|
||||||
json: jest.fn().mockResolvedValue(aboutUsResponse),
|
|
||||||
} as Response)
|
|
||||||
|
|
||||||
const response = await AboutUsService.getAbouts()
|
|
||||||
expect(response).toEqual(aboutUsData)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should create a new AboutUs', async () => {
|
|
||||||
jest.spyOn(global, 'fetch').mockResolvedValue({
|
|
||||||
json: jest.fn().mockResolvedValue({ id: '1' }),
|
|
||||||
} as Response)
|
|
||||||
|
|
||||||
const response = await AboutUsService.createAboutUs(aboutUsData[0])
|
|
||||||
expect(response).toEqual({ id: '1' })
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should update an AboutUs', async () => {
|
|
||||||
jest.spyOn(global, 'fetch').mockResolvedValue({
|
|
||||||
json: jest.fn().mockResolvedValue({ id: '1' }),
|
|
||||||
} as Response)
|
|
||||||
|
|
||||||
const response = await AboutUsService.updateAboutUs(aboutUsData[0].id, aboutUsData[0])
|
|
||||||
expect(response).toEqual({ id: '1' })
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should delete an AboutUs', async () => {
|
|
||||||
jest.spyOn(global, 'fetch').mockResolvedValue({
|
|
||||||
json: jest.fn().mockResolvedValue({ id: '1' }),
|
|
||||||
} as Response)
|
|
||||||
|
|
||||||
const response = await AboutUsService.deleteAboutUs({ id: '1' } as any)
|
|
||||||
expect(response).toEqual({ id: '1' })
|
|
||||||
})
|
|
||||||
})
|
|
Loading…
Reference in New Issue