Skip to content
Snippets Groups Projects
Commit 6d8b994c authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

feat(TU): add BO TU

parent 284dc04a
No related branches found
No related tags found
2 merge requests!12Feat/donnes tech debut contrat,!10Feat/rechercher point
Pipeline #39683 passed
const { createBoConsent } = require('../../src/requests/bo')
import * as axios from 'axios'
jest.mock('axios')
describe('Backoffice routes', () => {
describe('createBoConsent', () => {
it('should send consent to BO', async () => {
const consent = await createBoConsent({
pdl: 11111111111111,
name: 'POUET',
adresse: '20 rue du lac',
postalCode: '69003',
inseeCode: '69383',
})
expect(consent).toBe({ id: 'abce23' })
})
it('should handle unavailable BO', async () => {
axios.post.mockImplementation(() => Promise.reject({ status: 500 }))
const consent = await createBoConsent({
pdl: 11111111111111,
name: 'POUET',
adresse: '20 rue du lac',
postalCode: '69003',
inseeCode: '69383',
})
expect(consent).toBe(null)
})
})
})
describe('Sge routes', () => {
//TODO: write TU
it('should be true', () => {
expect(true).toBe(true)
})
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment