mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 06:38:17 +00:00
[Search] Repurposed checkAll test. #1117
Changed test to ensure checkAll and it's appropriate filter string are set whenever checkAll is changed. Removed redundant line checking for a filter string of 'NONE' as this is no longer a possibility.
This commit is contained in:
@ -76,13 +76,15 @@ define(
|
|||||||
expect(mockScope.ngModel.filtersString).not.toEqual('');
|
expect(mockScope.ngModel.filtersString).not.toEqual('');
|
||||||
});
|
});
|
||||||
|
|
||||||
it("changing checkAll status updates the filter string", function () {
|
it("changing checkAll status sets checkAll to true", function () {
|
||||||
controller.checkAll();
|
controller.checkAll();
|
||||||
|
expect(mockScope.ngModel.checkAll).toEqual(true);
|
||||||
expect(mockScope.ngModel.filtersString).toEqual('');
|
expect(mockScope.ngModel.filtersString).toEqual('');
|
||||||
|
|
||||||
mockScope.ngModel.checkAll = false;
|
mockScope.ngModel.checkAll = false;
|
||||||
|
|
||||||
controller.checkAll();
|
controller.checkAll();
|
||||||
|
expect(mockScope.ngModel.checkAll).toEqual(true);
|
||||||
expect(mockScope.ngModel.filtersString).toEqual('');
|
expect(mockScope.ngModel.filtersString).toEqual('');
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -117,7 +119,6 @@ define(
|
|||||||
|
|
||||||
controller.updateOptions();
|
controller.updateOptions();
|
||||||
|
|
||||||
expect(mockScope.ngModel.filtersString).not.toEqual('NONE');
|
|
||||||
expect(mockScope.ngModel.filtersString).not.toEqual('');
|
expect(mockScope.ngModel.filtersString).not.toEqual('');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user