diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-06-06 14:15:03 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-06-06 14:15:03 +0200 |
commit | be587647f98a4b83ca06a61fe55c7ac5d60927c6 (patch) | |
tree | 8a28a1cb9c9a06d80803ecd3fa00aa6767bb3f8b /server/tests/api/users.js | |
parent | 8483b2216454afdb88f6aa53cad5eecd8c394bc0 (diff) | |
download | PeerTube-be587647f98a4b83ca06a61fe55c7ac5d60927c6.tar.gz PeerTube-be587647f98a4b83ca06a61fe55c7ac5d60927c6.tar.zst PeerTube-be587647f98a4b83ca06a61fe55c7ac5d60927c6.zip |
Add tags support to server
Diffstat (limited to 'server/tests/api/users.js')
-rw-r--r-- | server/tests/api/users.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/server/tests/api/users.js b/server/tests/api/users.js index 9ab5083a0..7ab426d85 100644 --- a/server/tests/api/users.js +++ b/server/tests/api/users.js | |||
@@ -79,7 +79,12 @@ describe('Test users', function () { | |||
79 | 79 | ||
80 | it('Should not be able to upload a video', function (done) { | 80 | it('Should not be able to upload a video', function (done) { |
81 | accessToken = 'mysupertoken' | 81 | accessToken = 'mysupertoken' |
82 | utils.uploadVideo(server.url, accessToken, 'my super name', 'my super description', 'video_short.webm', 401, done) | 82 | |
83 | const name = 'my super name' | ||
84 | const description = 'my super description' | ||
85 | const tags = [ 'tag1', 'tag2' ] | ||
86 | const video = 'video_short.webm' | ||
87 | utils.uploadVideo(server.url, accessToken, name, description, tags, video, 401, done) | ||
83 | }) | 88 | }) |
84 | 89 | ||
85 | it('Should not be able to make friends', function (done) { | 90 | it('Should not be able to make friends', function (done) { |
@@ -102,7 +107,11 @@ describe('Test users', function () { | |||
102 | }) | 107 | }) |
103 | 108 | ||
104 | it('Should upload the video with the correct token', function (done) { | 109 | it('Should upload the video with the correct token', function (done) { |
105 | utils.uploadVideo(server.url, accessToken, 'my super name', 'my super description', 'video_short.webm', 204, function (err, res) { | 110 | const name = 'my super name' |
111 | const description = 'my super description' | ||
112 | const tags = [ 'tag1', 'tag2' ] | ||
113 | const video = 'video_short.webm' | ||
114 | utils.uploadVideo(server.url, accessToken, name, description, tags, video, 204, function (err, res) { | ||
106 | if (err) throw err | 115 | if (err) throw err |
107 | 116 | ||
108 | utils.getVideosList(server.url, function (err, res) { | 117 | utils.getVideosList(server.url, function (err, res) { |
@@ -118,7 +127,11 @@ describe('Test users', function () { | |||
118 | }) | 127 | }) |
119 | 128 | ||
120 | it('Should upload the video again with the correct token', function (done) { | 129 | it('Should upload the video again with the correct token', function (done) { |
121 | utils.uploadVideo(server.url, accessToken, 'my super name 2', 'my super description 2', 'video_short.webm', 204, done) | 130 | const name = 'my super name 2' |
131 | const description = 'my super description 2' | ||
132 | const tags = [ 'tag1' ] | ||
133 | const video = 'video_short.webm' | ||
134 | utils.uploadVideo(server.url, accessToken, name, description, tags, video, 204, done) | ||
122 | }) | 135 | }) |
123 | 136 | ||
124 | it('Should not be able to remove the video with an incorrect token', function (done) { | 137 | it('Should not be able to remove the video with an incorrect token', function (done) { |