Sha256: c52c2785443f9c29c5b96f13fa5caaf25d26a12c5a0b7db2a0f1232fe842a18d
Contents?: true
Size: 735 Bytes
Versions: 70
Compression:
Stored size: 735 Bytes
Contents
describe('Directive:bstFeatureFlag', function() { var element, scope; beforeEach(module('Bastion.features')); beforeEach(module(function ($provide) { $provide.value('FeatureSettings', {'custom_products': false}); })); beforeEach(inject(function($injector) { var compile = $injector.get('$compile'); element = angular.element('<div bst-feature-flag="custom_products"><button>New Product</button><span>Test</span></div>'); scope = $injector.get('$rootScope').$new(); compile(element)(scope); scope.$digest(); })); it("should remove the element if the feature is disabled", function () { expect(element.find('button').length).toBe(0); }); });
Version data entries
70 entries across 70 versions & 1 rubygems