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=", () => {
|
||||
//Arrange
|
||||
const data = []
|
||||
const data = 1
|
||||
let resultDB = null
|
||||
const req = {
|
||||
query: {
|
||||
id: '1',
|
||||
},
|
||||
}
|
||||
const db = {
|
||||
getByID: () => {
|
||||
return data
|
||||
getByID: (id) => {
|
||||
resultDB = id
|
||||
},
|
||||
}
|
||||
const apiController = new ApiController(db)
|
||||
|
||||
let result = null
|
||||
const res = {
|
||||
getByID: (value) => {
|
||||
send: (value) => {
|
||||
result = value
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user