- describe('When adding a pod', function () {
- it('Should fail with nothing', function (done) {
- const data = {}
- requestsUtils.makePostBodyRequest(server.url, path, null, data, done)
- })
-
- it('Should fail without public key', function (done) {
- const data = {
- url: 'http://coucou.com'
- }
- requestsUtils.makePostBodyRequest(server.url, path, null, data, done)
- })
-
- it('Should fail without an url', function (done) {
- const data = {
- publicKey: 'mysuperpublickey'
- }
- requestsUtils.makePostBodyRequest(server.url, path, null, data, done)
- })
-
- it('Should fail with an incorrect url', function (done) {
- const data = {
- url: 'coucou.com',
- publicKey: 'mysuperpublickey'
- }
- requestsUtils.makePostBodyRequest(server.url, path, null, data, function () {
- data.url = 'http://coucou'
- requestsUtils.makePostBodyRequest(server.url, path, null, data, function () {
- data.url = 'coucou'
- requestsUtils.makePostBodyRequest(server.url, path, null, data, done)
- })
- })
- })
-
- it('Should succeed with the correct parameters', function (done) {
- const data = {
- url: 'http://coucou.com',
- publicKey: 'mysuperpublickey'
- }
- requestsUtils.makePostBodyRequest(server.url, path, null, data, done, 200)
- })
- })
-
- describe('For the friends API', function () {