aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/api
diff options
context:
space:
mode:
Diffstat (limited to 'test/api')
-rw-r--r--test/api/friends.js4
-rw-r--r--test/api/multiplePods.js4
-rw-r--r--test/api/singlePod.js11
3 files changed, 13 insertions, 6 deletions
diff --git a/test/api/friends.js b/test/api/friends.js
index 033d3799a..845ccd1a8 100644
--- a/test/api/friends.js
+++ b/test/api/friends.js
@@ -9,7 +9,7 @@
9 var utils = require('../utils') 9 var utils = require('../utils')
10 10
11 function getFriendsList (url, end) { 11 function getFriendsList (url, end) {
12 var path = '/api/pods/' 12 var path = '/api/v1/pods/'
13 13
14 request(url) 14 request(url)
15 .get(path) 15 .get(path)
@@ -75,7 +75,7 @@
75 }) 75 })
76 } 76 }
77 77
78 var path = '/api/pods/makefriends' 78 var path = '/api/v1/pods/makefriends'
79 79
80 // The second pod make friend with the third 80 // The second pod make friend with the third
81 request(urls[1]) 81 request(urls[1])
diff --git a/test/api/multiplePods.js b/test/api/multiplePods.js
index 3b69738f4..1edfc1ce3 100644
--- a/test/api/multiplePods.js
+++ b/test/api/multiplePods.js
@@ -11,7 +11,7 @@
11 webtorrent.silent = true 11 webtorrent.silent = true
12 12
13 describe('Test multiple pods', function () { 13 describe('Test multiple pods', function () {
14 var path = '/api/videos' 14 var path = '/api/v1/videos'
15 var apps = [] 15 var apps = []
16 var urls = [] 16 var urls = []
17 var video_id = -1 17 var video_id = -1
@@ -38,7 +38,7 @@
38 38
39 before(function (done) { 39 before(function (done) {
40 this.timeout(30000) 40 this.timeout(30000)
41 var path_friends = '/api/pods/makefriends' 41 var path_friends = '/api/v1/pods/makefriends'
42 42
43 utils.runMultipleServers(3, function (apps_run, urls_run) { 43 utils.runMultipleServers(3, function (apps_run, urls_run) {
44 apps = apps_run 44 apps = apps_run
diff --git a/test/api/singlePod.js b/test/api/singlePod.js
index 5c4c892bb..bc9243c1c 100644
--- a/test/api/singlePod.js
+++ b/test/api/singlePod.js
@@ -3,6 +3,7 @@
3 3
4 var request = require('supertest') 4 var request = require('supertest')
5 var chai = require('chai') 5 var chai = require('chai')
6 var fs = require('fs')
6 var expect = chai.expect 7 var expect = chai.expect
7 var webtorrent = require(__dirname + '/../../src/webTorrentNode') 8 var webtorrent = require(__dirname + '/../../src/webTorrentNode')
8 webtorrent.silent = true 9 webtorrent.silent = true
@@ -10,7 +11,7 @@
10 var utils = require('../utils') 11 var utils = require('../utils')
11 12
12 describe('Test a single pod', function () { 13 describe('Test a single pod', function () {
13 var path = '/api/videos' 14 var path = '/api/v1/videos'
14 var app = null 15 var app = null
15 var url = '' 16 var url = ''
16 var video_id = -1 17 var video_id = -1
@@ -98,7 +99,13 @@
98 .expect(204) 99 .expect(204)
99 .end(function (err, res) { 100 .end(function (err, res) {
100 if (err) throw err 101 if (err) throw err
101 done() 102
103 fs.readdir(__dirname + '/../../test1/uploads/', function (err, files) {
104 if (err) throw err
105
106 expect(files.length).to.equal(0)
107 done()
108 })
102 }) 109 })
103 }) 110 })
104 111