diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-06-18 16:13:54 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-06-18 16:13:54 +0200 |
commit | 528a9efa8272532bbd0dafc35c3e05e57c50f61e (patch) | |
tree | 62d4417df4ab9b2e53c44dc7271be81b88e4e0e5 /server/tests/api/checkParams.js | |
parent | b2e4c0ba1a33b8a50491a1f8d111468a7da5640f (diff) | |
download | PeerTube-528a9efa8272532bbd0dafc35c3e05e57c50f61e.tar.gz PeerTube-528a9efa8272532bbd0dafc35c3e05e57c50f61e.tar.zst PeerTube-528a9efa8272532bbd0dafc35c3e05e57c50f61e.zip |
Try to make a better communication (between pods) module
Diffstat (limited to 'server/tests/api/checkParams.js')
-rw-r--r-- | server/tests/api/checkParams.js | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/server/tests/api/checkParams.js b/server/tests/api/checkParams.js index 95a7738f8..7f22a37cc 100644 --- a/server/tests/api/checkParams.js +++ b/server/tests/api/checkParams.js | |||
@@ -90,33 +90,27 @@ describe('Test parameters validator', function () { | |||
90 | 90 | ||
91 | it('Should fail without public key', function (done) { | 91 | it('Should fail without public key', function (done) { |
92 | const data = { | 92 | const data = { |
93 | data: { | 93 | url: 'http://coucou.com' |
94 | url: 'http://coucou.com' | ||
95 | } | ||
96 | } | 94 | } |
97 | makePostBodyRequest(path, data, done) | 95 | makePostBodyRequest(path, data, done) |
98 | }) | 96 | }) |
99 | 97 | ||
100 | it('Should fail without an url', function (done) { | 98 | it('Should fail without an url', function (done) { |
101 | const data = { | 99 | const data = { |
102 | data: { | 100 | publicKey: 'mysuperpublickey' |
103 | publicKey: 'mysuperpublickey' | ||
104 | } | ||
105 | } | 101 | } |
106 | makePostBodyRequest(path, data, done) | 102 | makePostBodyRequest(path, data, done) |
107 | }) | 103 | }) |
108 | 104 | ||
109 | it('Should fail with an incorrect url', function (done) { | 105 | it('Should fail with an incorrect url', function (done) { |
110 | const data = { | 106 | const data = { |
111 | data: { | 107 | url: 'coucou.com', |
112 | url: 'coucou.com', | 108 | publicKey: 'mysuperpublickey' |
113 | publicKey: 'mysuperpublickey' | ||
114 | } | ||
115 | } | 109 | } |
116 | makePostBodyRequest(path, data, function () { | 110 | makePostBodyRequest(path, data, function () { |
117 | data.data.url = 'http://coucou' | 111 | data.url = 'http://coucou' |
118 | makePostBodyRequest(path, data, function () { | 112 | makePostBodyRequest(path, data, function () { |
119 | data.data.url = 'coucou' | 113 | data.url = 'coucou' |
120 | makePostBodyRequest(path, data, done) | 114 | makePostBodyRequest(path, data, done) |
121 | }) | 115 | }) |
122 | }) | 116 | }) |
@@ -124,10 +118,8 @@ describe('Test parameters validator', function () { | |||
124 | 118 | ||
125 | it('Should succeed with the correct parameters', function (done) { | 119 | it('Should succeed with the correct parameters', function (done) { |
126 | const data = { | 120 | const data = { |
127 | data: { | 121 | url: 'http://coucou.com', |
128 | url: 'http://coucou.com', | 122 | publicKey: 'mysuperpublickey' |
129 | publicKey: 'mysuperpublickey' | ||
130 | } | ||
131 | } | 123 | } |
132 | makePostBodyRequest(path, data, done, false) | 124 | makePostBodyRequest(path, data, done, false) |
133 | }) | 125 | }) |