From 92022e493ee882f486e2ad9e5e0986b1af90f614 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Wed, 25 Feb 2015 01:05:58 +0100 Subject: Add backend tests for new API functions These new functions are: * getSavedRevisionsCount * listSavedRevisions * saveRevision + typo fixing in backend tests --- src/node/db/Pad.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/node/db') diff --git a/src/node/db/Pad.js b/src/node/db/Pad.js index 7a02e0fb..53847600 100644 --- a/src/node/db/Pad.js +++ b/src/node/db/Pad.js @@ -63,6 +63,9 @@ Pad.prototype.getSavedRevisionsList = function getSavedRevisionsList() { for(var rev in this.savedRevisions){ savedRev.push(this.savedRevisions[rev].revNum); } + savedRev.sort(function(a, b) { + return a - b; + }); return savedRev; }; -- cgit v1.2.3