+ const body = {
+ urls: [ 'http://localhost:9002' ]
+ }
+
+ it('Should fail without urls', function (done) {
+ request(server.url)
+ .post(path + '/makefriends')
+ .set('Authorization', 'Bearer faketoken')
+ .set('Accept', 'application/json')
+ .expect(401, done)
+ })
+
+ it('Should fail with urls is not an array', function (done) {
+ request(server.url)
+ .post(path + '/makefriends')
+ .send({ urls: 'http://localhost:9002' })
+ .set('Authorization', 'Bearer faketoken')
+ .set('Accept', 'application/json')
+ .expect(401, done)
+ })
+
+ it('Should fail if the array is not composed by urls', function (done) {
+ request(server.url)
+ .post(path + '/makefriends')
+ .send({ urls: [ 'http://localhost:9002', 'localhost:coucou' ] })
+ .set('Authorization', 'Bearer faketoken')
+ .set('Accept', 'application/json')
+ .expect(401, done)
+ })
+