From f5a60a5138135a3412dfbcfd6e564f7aa47a55c2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 6 Nov 2015 17:34:15 +0100 Subject: Add API versionning --- test/api/singlePod.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'test/api/singlePod.js') 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 @@ var request = require('supertest') var chai = require('chai') + var fs = require('fs') var expect = chai.expect var webtorrent = require(__dirname + '/../../src/webTorrentNode') webtorrent.silent = true @@ -10,7 +11,7 @@ var utils = require('../utils') describe('Test a single pod', function () { - var path = '/api/videos' + var path = '/api/v1/videos' var app = null var url = '' var video_id = -1 @@ -98,7 +99,13 @@ .expect(204) .end(function (err, res) { if (err) throw err - done() + + fs.readdir(__dirname + '/../../test1/uploads/', function (err, files) { + if (err) throw err + + expect(files.length).to.equal(0) + done() + }) }) }) -- cgit v1.2.3