mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-24 01:13:21 +00:00
Fix failed adds a new tag rule js test
This commit is contained in:
@@ -15,6 +15,7 @@ describe "TagRulesCtrl", ->
|
||||
|
||||
inject ($rootScope, $controller) ->
|
||||
scope = $rootScope
|
||||
scope.enterprise_form = jasmine.createSpyObj('enterprise_form', ['$setDirty'])
|
||||
ctrl = $controller 'TagRulesCtrl', {$scope: scope, enterprise: enterprise}
|
||||
|
||||
describe "tagGroup start indices", ->
|
||||
@@ -27,6 +28,8 @@ describe "TagRulesCtrl", ->
|
||||
scope.addNewRuleTo(scope.tagGroups[0], "DiscountOrder")
|
||||
|
||||
it "adds a new rule of the specified type to the rules array for the tagGroup", ->
|
||||
expect(scope.enterprise_form.$setDirty).toHaveBeenCalled()
|
||||
|
||||
expect(scope.tagGroups[0].rules.length).toEqual 3
|
||||
expect(scope.tagGroups[0].rules[2].type).toEqual "TagRule::DiscountOrder"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user