Skip to content

Commit

Permalink
removed some unused mocked calls
Browse files Browse the repository at this point in the history
  • Loading branch information
supernomad committed Jun 20, 2015
1 parent 2bfc617 commit e41c81d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
18 changes: 3 additions & 15 deletions mocks/libs/caching/localCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,11 @@ var typeHelper = require.main.require('libs/helpers/typeHelper'),
cache = {};
function create(key, val, ttl, callback) {
cache[key] = val;
if(typeHelper.isFunction(callback)) {
callback(null, true);
} else {
return true;
}
callback(null, true);
}

function restore(key, callback) {
if(typeHelper.isFunction(callback)) {
callback(null, {key: key, value: cache[key]});
} else {
return {key: key, value: cache[key]};
}
callback(null, {key: key, value: cache[key]});
}

function update(key, val, ttl, callback) {
Expand All @@ -23,11 +15,7 @@ function update(key, val, ttl, callback) {

function del(key, callback) {
delete cache[key];
if(typeHelper.isFunction(callback)) {
callback(null, 1);
} else {
return 1;
}
callback(null, 1);
}

module.exports = {
Expand Down
11 changes: 0 additions & 11 deletions mocks/libs/io.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* global Buffer */
var fs = require('fs');

function getFileStats(path, callback) {
// TODO get temp stats object
callback(null, {});
}

function createFile(path, buffer, offset, length, callback) {
callback(null);
}
Expand All @@ -22,20 +17,14 @@ function readFile(path, callback) {
callback(null, new Buffer(0));
}

function readFileChunk(path, buffer, offset, length, position, callback) {
callback(null, 0, new Buffer(0));
}

function renameFile(path, newPath, callback) {
callback(null);
}

module.exports = {
GetFileStats: getFileStats,
CreateFile: createFile,
WriteFileChunk: writeFileChunk,
DeleteFile: deleteFile,
ReadFile: readFile,
ReadFileChunk: readFileChunk,
RenameFile: renameFile
};

0 comments on commit e41c81d

Please sign in to comment.