Merge branch 'dev' of https://git.verdnatura.es/salix into dev

This commit is contained in:
Dani Herrero 2017-09-27 09:25:39 +02:00
commit bc20725c6c
2 changed files with 21 additions and 38 deletions

View File

@ -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();
});
});
});
});

View File

@ -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"
}
}