mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-03 02:21:33 +00:00
Add a test for sorting admin products by name
This commit is contained in:
@@ -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", ->
|
||||
|
||||
Reference in New Issue
Block a user