Move filename validation out of the Router and into the FilesAdaptor (#6157)

* Move filename validation out of the Router and into the FilesAdaptor

* Address PR comments

* Update unittests to handle FilesAdapter interface change

* Make validateFilename optional
This commit is contained in:
Mike Patnode
2019-10-26 19:15:21 -07:00
committed by Diamond Lewis
parent 93fe6b44e4
commit 1c8d4a6519
7 changed files with 93 additions and 22 deletions

View File

@@ -64,6 +64,7 @@ describe('AdaptableController', () => {
deleteFile: function() {},
getFileData: function() {},
getFileLocation: function() {},
validateFilename: function() {},
};
expect(() => {
new FilesController(adapter);
@@ -77,6 +78,7 @@ describe('AdaptableController', () => {
AGoodAdapter.prototype.deleteFile = function() {};
AGoodAdapter.prototype.getFileData = function() {};
AGoodAdapter.prototype.getFileLocation = function() {};
AGoodAdapter.prototype.validateFilename = function() {};
const adapter = new AGoodAdapter();
expect(() => {