aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-11-14 16:32:12 +0100
committerChocobozzz <me@florianbigard.com>2018-11-14 16:32:28 +0100
commita130f33c9c07ffaf2f11a5e629d686a158b9e1c7 (patch)
tree8e340e536e6a755b9a0ec3e96f9c8583f570579e /server/tests/utils
parente5cb43e071924b8cbc77731d3a0511b4f7bcff9d (diff)
downloadPeerTube-a130f33c9c07ffaf2f11a5e629d686a158b9e1c7.tar.gz
PeerTube-a130f33c9c07ffaf2f11a5e629d686a158b9e1c7.tar.zst
PeerTube-a130f33c9c07ffaf2f11a5e629d686a158b9e1c7.zip
Add AP fetch tests
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/miscs/sql.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/tests/utils/miscs/sql.ts b/server/tests/utils/miscs/sql.ts
index 204ff5163..027f78131 100644
--- a/server/tests/utils/miscs/sql.ts
+++ b/server/tests/utils/miscs/sql.ts
@@ -24,6 +24,15 @@ function setActorField (serverNumber: number, to: string, field: string, value:
24 return seq.query(`UPDATE actor SET "${field}" = '${value}' WHERE url = '${to}'`, options) 24 return seq.query(`UPDATE actor SET "${field}" = '${value}' WHERE url = '${to}'`, options)
25} 25}
26 26
27function setVideoField (serverNumber: number, uuid: string, field: string, value: string) {
28 const seq = getSequelize(serverNumber)
29
30 const options = { type: Sequelize.QueryTypes.UPDATE }
31
32 return seq.query(`UPDATE video SET "${field}" = '${value}' WHERE uuid = '${uuid}'`, options)
33}
34
27export { 35export {
36 setVideoField,
28 setActorField 37 setActorField
29} 38}