mirror of
https://github.com/Aviortheking/IMIE_CQ.git
synced 2025-06-07 16:29:54 +00:00
Correction du TU de getbyID => A toi de jouer flouflou
This commit is contained in:
parent
0d7c37a03d
commit
e24cc8a24a
@ -54,22 +54,23 @@ describe('APIController', () => {
|
|||||||
})
|
})
|
||||||
it("Doit retouner le resultat de l'appel getByID par la route ?id=", () => {
|
it("Doit retouner le resultat de l'appel getByID par la route ?id=", () => {
|
||||||
//Arrange
|
//Arrange
|
||||||
const data = []
|
const data = 1
|
||||||
|
let resultDB = null
|
||||||
const req = {
|
const req = {
|
||||||
query: {
|
query: {
|
||||||
id: '1',
|
id: '1',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
const db = {
|
const db = {
|
||||||
getByID: () => {
|
getByID: (id) => {
|
||||||
return data
|
resultDB = id
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
const apiController = new ApiController(db)
|
const apiController = new ApiController(db)
|
||||||
|
|
||||||
let result = null
|
let result = null
|
||||||
const res = {
|
const res = {
|
||||||
getByID: (value) => {
|
send: (value) => {
|
||||||
result = value
|
result = value
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user