diff --git a/spec/javascripts/unit/admin/tag_rules/controllers/tag_rules_controller_spec.js.coffee b/spec/javascripts/unit/admin/tag_rules/controllers/tag_rules_controller_spec.js.coffee index 2526016d3d..7ac5cc8fbc 100644 --- a/spec/javascripts/unit/admin/tag_rules/controllers/tag_rules_controller_spec.js.coffee +++ b/spec/javascripts/unit/admin/tag_rules/controllers/tag_rules_controller_spec.js.coffee @@ -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"