231801_test_to_master #1519
|
@ -17,17 +17,6 @@ describe('Component vnTh', () => {
|
||||||
controller.column.setAttribute('field', 'MyField');
|
controller.column.setAttribute('field', 'MyField');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('onInit()', () => {
|
|
||||||
it(`should define controllers order as per defaultOrder then call setOrder()`, () => {
|
|
||||||
controller.defaultOrder = 'DESC';
|
|
||||||
jest.spyOn(controller.table, 'setOrder');
|
|
||||||
controller.$onInit();
|
|
||||||
|
|
||||||
expect(controller.order).toEqual('DESC');
|
|
||||||
expect(controller.table.setOrder).toHaveBeenCalledWith('MyField', 'DESC');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('toggleOrder()', () => {
|
describe('toggleOrder()', () => {
|
||||||
it(`should change the ordenation to DESC (descendant) if it was ASC (ascendant)`, () => {
|
it(`should change the ordenation to DESC (descendant) if it was ASC (ascendant)`, () => {
|
||||||
controller.order = 'ASC';
|
controller.order = 'ASC';
|
||||||
|
|
Loading…
Reference in New Issue