diff --git a/client/core/src/autocomplete/autocomplete.spec.js b/client/core/src/autocomplete/autocomplete.spec.js index 99be2f97b..060ec5c96 100644 --- a/client/core/src/autocomplete/autocomplete.spec.js +++ b/client/core/src/autocomplete/autocomplete.spec.js @@ -71,10 +71,29 @@ describe('Component vnAutocomplete', () => { controller.field = {name: 'Bruce Wayne'}; expect(controller._multiField).toEqual([]); - - // value is still stored in _field after second call... is this correct? or should be deleted as per _multifield? ask Dani! expect(controller._field).toEqual('Bruce Wayne'); }); }); + + describe('when value is not an object', () => { // not sure if it isnt an object actually + it(`should set _field value`, () => { + let controller = $componentController('vnAutocomplete', {$scope, $element, $httpBackend, $timeout}); + controller.valueField = 'name'; + controller.items = [{name: 'test1'}, {name: 'test2'}]; + // controller.field = 6; puede ser cualquier cosa + + // // request datasources.development.json to Vicente to carry on + // // let json = find out the value of json stringify + // // let url = find out the url for get endpoint + + // controller.field = {name: 'Bruce Wayne'}; + + // // same URL for requests + // $httpBackend.when('GET', `localhost:5000?filter=Bruce`).respond('done'); + // $httpBackend.expectGET(`localhost:5000?filter=Bruce`, {name: 'Bruce Wayne'}); + // // any value to be defined before the flush? + // $httpBackend.flush(); + }); + }); }); }); diff --git a/services/production/datasources.test.json b/services/production/datasources.test.json deleted file mode 100644 index 6e81700ce..000000000 --- a/services/production/datasources.test.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "db": - { - "name": "db", - "connector": "memory", - "file": "db.json" - }, - "auth": - { - "name": "mysql", - "connector": "mysql", - "database": "salix", - "debug": false, - "host": "localhost", - "port": 3306, - "username": "root", - "password": "" - }, - "vn": { - "name": "mysql", - "connector": "mysql", - "database": "salix", - "debug": false, - "host": "localhost", - "port": 3306, - "username": "root", - "password": "", - "connectTimeout": 20000, - "acquireTimeout": 20000 - }, - "client": { - "name": "client", - "connector": "remote", - "url": "http://localhost:3002/api" - } -}