diff options
Diffstat (limited to 'server/tests/client.ts')
-rw-r--r-- | server/tests/client.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/server/tests/client.ts b/server/tests/client.ts index 0d70e3451..8c4334c53 100644 --- a/server/tests/client.ts +++ b/server/tests/client.ts | |||
@@ -41,8 +41,9 @@ describe('Test a client controllers', function () { | |||
41 | 41 | ||
42 | it('Should have valid Open Graph tags on the watch page with video id', async function () { | 42 | it('Should have valid Open Graph tags on the watch page with video id', async function () { |
43 | const res = await request(server.url) | 43 | const res = await request(server.url) |
44 | .get('/videos/watch/' + server.video.id) | 44 | .get('/videos/watch/' + server.video.id) |
45 | .expect(200) | 45 | .set('Accept', 'text/html') |
46 | .expect(200) | ||
46 | 47 | ||
47 | expect(res.text).to.contain('<meta property="og:title" content="my super name for server 1" />') | 48 | expect(res.text).to.contain('<meta property="og:title" content="my super name for server 1" />') |
48 | expect(res.text).to.contain('<meta property="og:description" content="my super description for server 1" />') | 49 | expect(res.text).to.contain('<meta property="og:description" content="my super description for server 1" />') |
@@ -50,8 +51,9 @@ describe('Test a client controllers', function () { | |||
50 | 51 | ||
51 | it('Should have valid Open Graph tags on the watch page with video uuid', async function () { | 52 | it('Should have valid Open Graph tags on the watch page with video uuid', async function () { |
52 | const res = await request(server.url) | 53 | const res = await request(server.url) |
53 | .get('/videos/watch/' + server.video.uuid) | 54 | .get('/videos/watch/' + server.video.uuid) |
54 | .expect(200) | 55 | .set('Accept', 'text/html') |
56 | .expect(200) | ||
55 | 57 | ||
56 | expect(res.text).to.contain('<meta property="og:title" content="my super name for server 1" />') | 58 | expect(res.text).to.contain('<meta property="og:title" content="my super name for server 1" />') |
57 | expect(res.text).to.contain('<meta property="og:description" content="my super description for server 1" />') | 59 | expect(res.text).to.contain('<meta property="og:description" content="my super description for server 1" />') |
@@ -61,6 +63,7 @@ describe('Test a client controllers', function () { | |||
61 | const path = '/videos/watch/' + server.video.uuid | 63 | const path = '/videos/watch/' + server.video.uuid |
62 | const res = await request(server.url) | 64 | const res = await request(server.url) |
63 | .get(path) | 65 | .get(path) |
66 | .set('Accept', 'text/html') | ||
64 | .expect(200) | 67 | .expect(200) |
65 | 68 | ||
66 | const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:9001/services/oembed?' + | 69 | const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:9001/services/oembed?' + |