[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 ''
This commit is contained in:
Kevin Van Kessel 2016-08-22 13:19:47 -07:00 committed by GitHub
parent e29efbbcdf
commit 702ebbd557

View File

@ -83,7 +83,7 @@ define(
mockScope.ngModel.checkAll = false; mockScope.ngModel.checkAll = false;
controller.checkAll(); controller.checkAll();
expect(mockScope.ngModel.filtersString).toEqual('NONE'); expect(mockScope.ngModel.filtersString).toEqual('');
}); });
it("checking checkAll option resets other options", function () { it("checking checkAll option resets other options", function () {
@ -97,7 +97,7 @@ define(
}); });
}); });
it("tells the user when no options are checked", function () { it("checks checkAll when no options are checked", function () {
Object.keys(mockScope.ngModel.checked).forEach(function (type) { Object.keys(mockScope.ngModel.checked).forEach(function (type) {
mockScope.ngModel.checked[type] = false; mockScope.ngModel.checked[type] = false;
}); });
@ -105,7 +105,8 @@ define(
controller.updateOptions(); controller.updateOptions();
expect(mockScope.ngModel.filtersString).toEqual('NONE'); expect(mockScope.ngModel.filtersString).toEqual('');
expect(mockScope.ngModel.checkAll).toEqual(true);
}); });
it("tells the user when options are checked", function () { it("tells the user when options are checked", function () {