mirror of https://github.com/Kylart/KawAnime.git
freakin test
This commit is contained in:
parent
72c8384245
commit
f8509f8b17
|
@ -128,6 +128,7 @@ test('/getLatest.json exits and returns 18 elements with right keys at 720p', as
|
||||||
|
|
||||||
test('/download Mahou Shoujo Ikusei Keikaku with HorribleSubs at 720p on nyaa.pantsu.cat exits and returns' +
|
test('/download Mahou Shoujo Ikusei Keikaku with HorribleSubs at 720p on nyaa.pantsu.cat exits and returns' +
|
||||||
' all magnets', async t => {
|
' all magnets', async t => {
|
||||||
|
try {
|
||||||
const { data, status } = await axios.post(`${uri}/download`, {
|
const { data, status } = await axios.post(`${uri}/download`, {
|
||||||
name: 'Mahou Shoujo Ikusei Keikaku',
|
name: 'Mahou Shoujo Ikusei Keikaku',
|
||||||
quality: '720p',
|
quality: '720p',
|
||||||
|
@ -141,6 +142,10 @@ test('/download Mahou Shoujo Ikusei Keikaku with HorribleSubs at 720p on nyaa.pa
|
||||||
t.is(data.magnets.length, 12)
|
t.is(data.magnets.length, 12)
|
||||||
t.not(data.magnets[0], '')
|
t.not(data.magnets[0], '')
|
||||||
} else {
|
} else {
|
||||||
|
t.is(status, 204)
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.info(e)
|
||||||
t.fail()
|
t.fail()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue