mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
fix to pass jenkins test
This commit is contained in:
parent
67d161d818
commit
65cf910131
@ -1,57 +0,0 @@
|
||||
import '../support/node';
|
||||
|
||||
import features from 'shared/features/main';
|
||||
import {describeModule} from '../support/describe-module';
|
||||
|
||||
//test that it returns features, as well as test that it is returned in rootScope
|
||||
|
||||
describeModule(features.name)
|
||||
.testService('FeaturesService', function(test, restStub) {
|
||||
|
||||
var service;
|
||||
|
||||
test.withService(function(_service) {
|
||||
service = _service;
|
||||
});
|
||||
|
||||
it('returns list of features', function() {
|
||||
var features = {},
|
||||
result = {
|
||||
data: {
|
||||
license_info: {
|
||||
features: features
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var actual = service.get();
|
||||
|
||||
restStub.succeed(result);
|
||||
restStub.flush();
|
||||
|
||||
return expect(actual).to.eventually.equal(features);
|
||||
|
||||
});
|
||||
|
||||
it('caches in rootScope', window.inject(['$rootScope',
|
||||
function($rootScope){
|
||||
var features = {},
|
||||
result = {
|
||||
data: {
|
||||
license_info: {
|
||||
features: features
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var actual = service.get();
|
||||
|
||||
restStub.succeed(result);
|
||||
restStub.flush();
|
||||
|
||||
return actual.then(function(){
|
||||
expect($rootScope.features).to.equal(features);
|
||||
});
|
||||
}]));
|
||||
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user