[Search] Update tests

Updated the SearchController tests for more coverage,
due to additions to the controller. Fixed a small
logic error in controller.areMore()
This commit is contained in:
slhale
2015-08-18 11:28:10 -07:00
parent 17aa666519
commit a98b65286f
2 changed files with 64 additions and 3 deletions

View File

@ -141,14 +141,14 @@ define(function () {
// Check to see if any of the not displayed results are of an allowed type
for (i = numResults; i < fullResults.hits.length; i += 1) {
if ($scope.ngModel.checked[fullResults.hits[i].object.getModel().type.key]) {
if ($scope.ngModel.checkAll || $scope.ngModel.checked[fullResults.hits[i].object.getModel().type]) {
return true;
}
}
// If none of the ones at hand are correct, there still may be more if we
// re-search with a larger maxResults
return numResults < fullResults.total;
return fullResults.hits.length < fullResults.total;
},
/**