Skip to content

Commit 702ebbd

Browse files
authored
[Search] Update test for #1117 fix.
Changed test to work properly with #1117 fix. Checks if checkAll gets checked when no options are checked. Checks if changing checkAll updates the filter string to ''
1 parent e29efbb commit 702ebbd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

platform/search/test/controllers/SearchMenuControllerSpec.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ define(
8383
mockScope.ngModel.checkAll = false;
8484

8585
controller.checkAll();
86-
expect(mockScope.ngModel.filtersString).toEqual('NONE');
86+
expect(mockScope.ngModel.filtersString).toEqual('');
8787
});
8888

8989
it("checking checkAll option resets other options", function () {
@@ -97,15 +97,16 @@ define(
9797
});
9898
});
9999

100-
it("tells the user when no options are checked", function () {
100+
it("checks checkAll when no options are checked", function () {
101101
Object.keys(mockScope.ngModel.checked).forEach(function (type) {
102102
mockScope.ngModel.checked[type] = false;
103103
});
104104
mockScope.ngModel.checkAll = false;
105105

106106
controller.updateOptions();
107107

108-
expect(mockScope.ngModel.filtersString).toEqual('NONE');
108+
expect(mockScope.ngModel.filtersString).toEqual('');
109+
expect(mockScope.ngModel.checkAll).toEqual(true);
109110
});
110111

111112
it("tells the user when options are checked", function () {

0 commit comments

Comments
 (0)