added a describe to help further implementation

This commit is contained in:
Carlos Jimenez 2018-07-31 12:00:44 +02:00
parent 6f78bc61db
commit 0fe58f78b4
1 changed files with 10 additions and 8 deletions

View File

@ -18,16 +18,18 @@ describe('Client', () => {
controller = $componentController('vnClientCreditInsuranceInsuranceIndex', {$stateParams: $stateParams});
}));
it('should perform a query to GET credit the credit classification', () => {
let res = [{finished: 'some value'}];
let query = '/client/api/CreditClassifications?filter=%7B%22fields%22%3A%5B%22finished%22%5D%2C%22where%22%3A%7B%22id%22%3A1%7D%7D';
describe('$onInit()', () => {
it('should perform a query to GET credit the credit classification', () => {
let res = [{finished: 'some value'}];
let query = '/client/api/CreditClassifications?filter=%7B%22fields%22%3A%5B%22finished%22%5D%2C%22where%22%3A%7B%22id%22%3A1%7D%7D';
$httpBackend.whenGET(query).respond(res);
$httpBackend.expectGET(query);
controller.$onInit();
$httpBackend.flush();
$httpBackend.whenGET(query).respond(res);
$httpBackend.expectGET(query);
controller.$onInit();
$httpBackend.flush();
expect(controller.isClosed).toBe(true);
expect(controller.isClosed).toBe(true);
});
});
});
});