diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-10 12:26:47 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-11 08:48:20 +0200 |
commit | 8be1afa12b700b93ed92365cab05c0ef81d643aa (patch) | |
tree | 563369bded16d3612a631bb1a9b068b2bb76abe8 /server/tests/api | |
parent | c7b0dacb28e3b5aa9f43a7a0eb683e2af9826cb9 (diff) | |
download | PeerTube-8be1afa12b700b93ed92365cab05c0ef81d643aa.tar.gz PeerTube-8be1afa12b700b93ed92365cab05c0ef81d643aa.tar.zst PeerTube-8be1afa12b700b93ed92365cab05c0ef81d643aa.zip |
Add ability to embed a video in Twitter
The instance should be whitelisted first
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/check-params/config.ts | 6 | ||||
-rw-r--r-- | server/tests/api/server/config.ts | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index 58b780f38..6aa31e38d 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts | |||
@@ -26,6 +26,12 @@ describe('Test config API validators', function () { | |||
26 | css: 'body { background-color: red; }' | 26 | css: 'body { background-color: red; }' |
27 | } | 27 | } |
28 | }, | 28 | }, |
29 | services: { | ||
30 | twitter: { | ||
31 | username: '@MySuperUsername', | ||
32 | whitelisted: true | ||
33 | } | ||
34 | }, | ||
29 | cache: { | 35 | cache: { |
30 | previews: { | 36 | previews: { |
31 | size: 2 | 37 | size: 2 |
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index 3f1b1532c..f24961b85 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts | |||
@@ -62,6 +62,8 @@ describe('Test config', function () { | |||
62 | expect(data.instance.defaultNSFWPolicy).to.equal('display') | 62 | expect(data.instance.defaultNSFWPolicy).to.equal('display') |
63 | expect(data.instance.customizations.css).to.be.empty | 63 | expect(data.instance.customizations.css).to.be.empty |
64 | expect(data.instance.customizations.javascript).to.be.empty | 64 | expect(data.instance.customizations.javascript).to.be.empty |
65 | expect(data.services.twitter.username).to.equal('@Chocobozzz') | ||
66 | expect(data.services.twitter.whitelisted).to.be.false | ||
65 | expect(data.cache.previews.size).to.equal(1) | 67 | expect(data.cache.previews.size).to.equal(1) |
66 | expect(data.signup.enabled).to.be.true | 68 | expect(data.signup.enabled).to.be.true |
67 | expect(data.signup.limit).to.equal(4) | 69 | expect(data.signup.limit).to.equal(4) |
@@ -90,6 +92,12 @@ describe('Test config', function () { | |||
90 | css: 'body { background-color: red; }' | 92 | css: 'body { background-color: red; }' |
91 | } | 93 | } |
92 | }, | 94 | }, |
95 | services: { | ||
96 | twitter: { | ||
97 | username: '@Kuja', | ||
98 | whitelisted: true | ||
99 | } | ||
100 | }, | ||
93 | cache: { | 101 | cache: { |
94 | previews: { | 102 | previews: { |
95 | size: 2 | 103 | size: 2 |
@@ -130,6 +138,8 @@ describe('Test config', function () { | |||
130 | expect(data.instance.defaultNSFWPolicy).to.equal('blur') | 138 | expect(data.instance.defaultNSFWPolicy).to.equal('blur') |
131 | expect(data.instance.customizations.javascript).to.equal('alert("coucou")') | 139 | expect(data.instance.customizations.javascript).to.equal('alert("coucou")') |
132 | expect(data.instance.customizations.css).to.equal('body { background-color: red; }') | 140 | expect(data.instance.customizations.css).to.equal('body { background-color: red; }') |
141 | expect(data.services.twitter.username).to.equal('@Kuja') | ||
142 | expect(data.services.twitter.whitelisted).to.be.true | ||
133 | expect(data.cache.previews.size).to.equal(2) | 143 | expect(data.cache.previews.size).to.equal(2) |
134 | expect(data.signup.enabled).to.be.false | 144 | expect(data.signup.enabled).to.be.false |
135 | expect(data.signup.limit).to.equal(5) | 145 | expect(data.signup.limit).to.equal(5) |
@@ -162,6 +172,8 @@ describe('Test config', function () { | |||
162 | expect(data.instance.defaultNSFWPolicy).to.equal('blur') | 172 | expect(data.instance.defaultNSFWPolicy).to.equal('blur') |
163 | expect(data.instance.customizations.javascript).to.equal('alert("coucou")') | 173 | expect(data.instance.customizations.javascript).to.equal('alert("coucou")') |
164 | expect(data.instance.customizations.css).to.equal('body { background-color: red; }') | 174 | expect(data.instance.customizations.css).to.equal('body { background-color: red; }') |
175 | expect(data.services.twitter.username).to.equal('@Kuja') | ||
176 | expect(data.services.twitter.whitelisted).to.be.true | ||
165 | expect(data.cache.previews.size).to.equal(2) | 177 | expect(data.cache.previews.size).to.equal(2) |
166 | expect(data.signup.enabled).to.be.false | 178 | expect(data.signup.enabled).to.be.false |
167 | expect(data.signup.limit).to.equal(5) | 179 | expect(data.signup.limit).to.equal(5) |
@@ -205,6 +217,8 @@ describe('Test config', function () { | |||
205 | expect(data.instance.defaultNSFWPolicy).to.equal('display') | 217 | expect(data.instance.defaultNSFWPolicy).to.equal('display') |
206 | expect(data.instance.customizations.css).to.be.empty | 218 | expect(data.instance.customizations.css).to.be.empty |
207 | expect(data.instance.customizations.javascript).to.be.empty | 219 | expect(data.instance.customizations.javascript).to.be.empty |
220 | expect(data.services.twitter.username).to.equal('@Chocobozzz') | ||
221 | expect(data.services.twitter.whitelisted).to.be.false | ||
208 | expect(data.cache.previews.size).to.equal(1) | 222 | expect(data.cache.previews.size).to.equal(1) |
209 | expect(data.signup.enabled).to.be.true | 223 | expect(data.signup.enabled).to.be.true |
210 | expect(data.signup.limit).to.equal(4) | 224 | expect(data.signup.limit).to.equal(4) |