diff --git a/spec/javascripts/unit/admin/bulk_product_update_spec.js.coffee b/spec/javascripts/unit/admin/bulk_product_update_spec.js.coffee index f7e7fd45b4..1783cfc957 100644 --- a/spec/javascripts/unit/admin/bulk_product_update_spec.js.coffee +++ b/spec/javascripts/unit/admin/bulk_product_update_spec.js.coffee @@ -357,6 +357,15 @@ describe "AdminProductEditCtrl", -> it "resets dirtyProducts", -> expect(DirtyProducts.clear).toHaveBeenCalled() + describe "sorting products", -> + it "sorts products", -> + spyOn $scope, "fetchProducts" + + $scope.sortOptions.toggle('name') + $scope.$apply() + + expect($scope.q.sorting).toEqual 'name asc' + expect($scope.fetchProducts).toHaveBeenCalled() describe "updating the product on hand count", -> it "updates when product is not available on demand", ->