Splits Adapter loading from AdaptableController

- Adds dynamic prototype conformance check upon setting adapter
- Throws when adapter is undefined, invalid in controller
This commit is contained in:
Florent Vilmart
2016-02-21 23:47:07 -05:00
parent 33fa5a7b2a
commit 23e55e941e
10 changed files with 210 additions and 116 deletions

View File

@@ -1,4 +1,5 @@
var FilesController = require('../src/Controllers/FilesController').FilesController;
var GridStoreAdapter = require("../src/Adapters/Files/GridStoreAdapter").GridStoreAdapter;
var Config = require("../src/Config");
// Small additional tests to improve overall coverage
@@ -6,7 +7,8 @@ describe("FilesController",()=>{
it("should properly expand objects", (done) => {
var config = new Config(Parse.applicationId);
var filesController = new FilesController();
var adapter = new GridStoreAdapter();
var filesController = new FilesController(adapter);
var result = filesController.expandFilesInObject(config, function(){});
expect(result).toBeUndefined();