mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-18 19:28:29 +00:00
test: change facebook test response to redirect
This commit is contained in:
parent
20975cb0fd
commit
87148e68ab
@ -33,7 +33,7 @@ export default async function({ sourceUrl, shortLink, username, id }) {
|
||||
: `https://web.facebook.com/${username}/videos/${id}`
|
||||
|
||||
if (isShortLink) url = await resolveUrl(url)
|
||||
if (isSharedLink) url = (sourceUrl)
|
||||
if (isSharedLink) url = sourceUrl
|
||||
|
||||
const html = await fetch(url, { headers })
|
||||
.then(r => r.text())
|
||||
|
@ -1167,7 +1167,7 @@
|
||||
"params": {},
|
||||
"expected": {
|
||||
"code": 200,
|
||||
"status": "stream"
|
||||
"status": "redirect"
|
||||
}
|
||||
}, {
|
||||
"name": "direct video with id as query param",
|
||||
@ -1175,7 +1175,7 @@
|
||||
"params": {},
|
||||
"expected": {
|
||||
"code": 200,
|
||||
"status": "stream"
|
||||
"status": "redirect"
|
||||
}
|
||||
}, {
|
||||
"name": "direct video with caption",
|
||||
@ -1183,7 +1183,7 @@
|
||||
"params": {},
|
||||
"expected": {
|
||||
"code": 200,
|
||||
"status": "stream"
|
||||
"status": "redirect"
|
||||
}
|
||||
}, {
|
||||
"name": "shortlink video",
|
||||
@ -1191,7 +1191,7 @@
|
||||
"params": {},
|
||||
"expected": {
|
||||
"code": 200,
|
||||
"status": "stream"
|
||||
"status": "redirect"
|
||||
}
|
||||
}, {
|
||||
"name": "reel video",
|
||||
@ -1199,7 +1199,7 @@
|
||||
"params": {},
|
||||
"expected": {
|
||||
"code": 200,
|
||||
"status": "stream"
|
||||
"status": "redirect"
|
||||
}
|
||||
}, {
|
||||
"name": "shared video link",
|
||||
@ -1207,7 +1207,15 @@
|
||||
"params": {},
|
||||
"expected": {
|
||||
"code": 200,
|
||||
"status": "stream"
|
||||
"status": "redirect"
|
||||
}
|
||||
}, {
|
||||
"name": "shared video link v2",
|
||||
"url": "https://web.facebook.com/share/r/JFZfPVgLkiJQmWrr/",
|
||||
"params": {},
|
||||
"expected": {
|
||||
"code": 200,
|
||||
"status": "redirect"
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user