aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test-three/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-three/main.js')
-rw-r--r--server/tests/fixtures/peertube-plugin-test-three/main.js39
1 files changed, 39 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test-three/main.js b/server/tests/fixtures/peertube-plugin-test-three/main.js
new file mode 100644
index 000000000..4945feb55
--- /dev/null
+++ b/server/tests/fixtures/peertube-plugin-test-three/main.js
@@ -0,0 +1,39 @@
1async function register ({
2 registerHook,
3 registerSetting,
4 settingsManager,
5 storageManager,
6 videoCategoryManager,
7 videoLicenceManager,
8 videoLanguageManager
9}) {
10 videoLanguageManager.addLanguage('al_bhed', 'Al Bhed')
11 videoLanguageManager.addLanguage('al_bhed2', 'Al Bhed 2')
12 videoLanguageManager.deleteLanguage('en')
13 videoLanguageManager.deleteLanguage('fr')
14
15 videoCategoryManager.addCategory(42, 'Best category')
16 videoCategoryManager.addCategory(43, 'High best category')
17 videoCategoryManager.deleteCategory(1) // Music
18 videoCategoryManager.deleteCategory(2) // Films
19
20 videoLicenceManager.addLicence(42, 'Best licence')
21 videoLicenceManager.addLicence(43, 'High best licence')
22 videoLicenceManager.deleteLicence(1) // Attribution
23 videoLicenceManager.deleteLicence(7) // Public domain
24}
25
26async function unregister () {
27 return
28}
29
30module.exports = {
31 register,
32 unregister
33}
34
35// ############################################################################
36
37function addToCount (obj) {
38 return Object.assign({}, obj, { count: obj.count + 1 })
39}