mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-23 09:13:34 -05:00
28 lines
734 B
JavaScript
28 lines
734 B
JavaScript
import '../support/node';
|
|
|
|
import featuresController from 'shared/features/features.controller';
|
|
|
|
describe('featuresController', function() {
|
|
|
|
it('checks if a feature is enabled', window.inject(['$rootScope', function($rootScope) {
|
|
var actual;
|
|
|
|
$rootScope.features = {
|
|
activity_streams: true,
|
|
ldap: false
|
|
};
|
|
|
|
// TODO: extract into test controller in describeModule
|
|
var Controller = featuresController[1];
|
|
var controller = new Controller($rootScope);
|
|
|
|
actual = controller.isFeatureEnabled('activity_streams');
|
|
expect(actual).to.be.true;
|
|
|
|
actual = controller.isFeatureEnabled('ldap');
|
|
expect(actual).to.be.false;
|
|
|
|
|
|
}]));
|
|
})
|