diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-30 13:16:23 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-30 13:16:23 +0100 |
commit | 98ec8b8e73a918d5680e6f13aaef56ca8756c2a8 (patch) | |
tree | a61c6797188227d1d07e3d9f91b8ea09684406c7 /server/tests | |
parent | 1b5b10d13152d704d2396a1e53d56aba1a8e7e03 (diff) | |
download | PeerTube-98ec8b8e73a918d5680e6f13aaef56ca8756c2a8.tar.gz PeerTube-98ec8b8e73a918d5680e6f13aaef56ca8756c2a8.tar.zst PeerTube-98ec8b8e73a918d5680e6f13aaef56ca8756c2a8.zip |
Fix lint
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/client.ts | 11 | ||||
-rw-r--r-- | server/tests/index.ts | 1 | ||||
-rw-r--r-- | server/tests/utils/index.ts | 1 |
3 files changed, 9 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?' + |
diff --git a/server/tests/index.ts b/server/tests/index.ts index a7dd0d824..755fb2604 100644 --- a/server/tests/index.ts +++ b/server/tests/index.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | // Order of the tests we want to execute | 1 | // Order of the tests we want to execute |
2 | import './client' | 2 | import './client' |
3 | import './activitypub' | ||
3 | import './api/' | 4 | import './api/' |
4 | import './cli/' | 5 | import './cli/' |
diff --git a/server/tests/utils/index.ts b/server/tests/utils/index.ts index 4308fd49a..b918ee83d 100644 --- a/server/tests/utils/index.ts +++ b/server/tests/utils/index.ts | |||
@@ -1,3 +1,4 @@ | |||
1 | export * from './activitypub' | ||
1 | export * from './cli' | 2 | export * from './cli' |
2 | export * from './clients' | 3 | export * from './clients' |
3 | export * from './config' | 4 | export * from './config' |