aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-07 09:48:10 +0200
committerChocobozzz <me@florianbigard.com>2018-06-07 09:57:35 +0200
commit99d103019c76c517ba607a0fab8022aa6d08ef2e (patch)
tree7132bede03e32ab27d0f43de024b2080b473454f /server/tests/utils
parent28be89161aab245526d64f6fb7dd29391a97fe0a (diff)
downloadPeerTube-99d103019c76c517ba607a0fab8022aa6d08ef2e.tar.gz
PeerTube-99d103019c76c517ba607a0fab8022aa6d08ef2e.tar.zst
PeerTube-99d103019c76c517ba607a0fab8022aa6d08ef2e.zip
Move fixtures in tests/
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/miscs/miscs.ts4
-rw-r--r--server/tests/utils/requests/requests.ts2
-rw-r--r--server/tests/utils/users/users.ts2
-rw-r--r--server/tests/utils/videos/videos.ts2
4 files changed, 4 insertions, 6 deletions
diff --git a/server/tests/utils/miscs/miscs.ts b/server/tests/utils/miscs/miscs.ts
index 53cb67baf..5e46004a7 100644
--- a/server/tests/utils/miscs/miscs.ts
+++ b/server/tests/utils/miscs/miscs.ts
@@ -46,7 +46,7 @@ async function testImage (url: string, imageName: string, imagePath: string, ext
46 46
47 const body = res.body 47 const body = res.body
48 48
49 const data = await readFileBufferPromise(join(__dirname, '..', '..', 'api', 'fixtures', imageName + extension)) 49 const data = await readFileBufferPromise(join(__dirname, '..', '..', 'fixtures', imageName + extension))
50 const minLength = body.length - ((20 * body.length) / 100) 50 const minLength = body.length - ((20 * body.length) / 100)
51 const maxLength = body.length + ((20 * body.length) / 100) 51 const maxLength = body.length + ((20 * body.length) / 100)
52 52
@@ -63,7 +63,7 @@ function buildAbsoluteFixturePath (path: string) {
63 return path 63 return path
64 } 64 }
65 65
66 return join(__dirname, '..', '..', 'api', 'fixtures', path) 66 return join(__dirname, '..', '..', 'fixtures', path)
67} 67}
68 68
69// --------------------------------------------------------------------------- 69// ---------------------------------------------------------------------------
diff --git a/server/tests/utils/requests/requests.ts b/server/tests/utils/requests/requests.ts
index a9b1dff9a..b6195089d 100644
--- a/server/tests/utils/requests/requests.ts
+++ b/server/tests/utils/requests/requests.ts
@@ -1,5 +1,5 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2import { buildAbsoluteFixturePath } from '../' 2import { buildAbsoluteFixturePath } from '../miscs/miscs'
3 3
4function makeGetRequest (options: { 4function makeGetRequest (options: {
5 url: string, 5 url: string,
diff --git a/server/tests/utils/users/users.ts b/server/tests/utils/users/users.ts
index d31e57a25..34d50f7ad 100644
--- a/server/tests/utils/users/users.ts
+++ b/server/tests/utils/users/users.ts
@@ -164,7 +164,7 @@ function updateMyAvatar (options: {
164 if (isAbsolute(options.fixture)) { 164 if (isAbsolute(options.fixture)) {
165 filePath = options.fixture 165 filePath = options.fixture
166 } else { 166 } else {
167 filePath = join(__dirname, '..', '..', 'api', 'fixtures', options.fixture) 167 filePath = join(__dirname, '..', '..', 'fixtures', options.fixture)
168 } 168 }
169 169
170 return makeUploadRequest({ 170 return makeUploadRequest({
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts
index 746b5ca6b..ab0ce12ec 100644
--- a/server/tests/utils/videos/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -502,8 +502,6 @@ async function completeVideoCheck (
502 expect(dateIsValid(video.updatedAt)).to.be.true 502 expect(dateIsValid(video.updatedAt)).to.be.true
503 503
504 if (attributes.publishedAt) { 504 if (attributes.publishedAt) {
505 console.log(attributes.publishedAt)
506 console.log(video.publishedAt)
507 expect(video.publishedAt).to.equal(attributes.publishedAt) 505 expect(video.publishedAt).to.equal(attributes.publishedAt)
508 } 506 }
509 507