mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 11:50:42 -03:30
Fix broken unit tests
This commit is contained in:
parent
b9427ecf6d
commit
bcee83e87c
@ -1,6 +1,7 @@
|
||||
describe('Components | Layout', () => {
|
||||
let $compile;
|
||||
let $rootScope;
|
||||
let $httpBackend;
|
||||
let element;
|
||||
let scope;
|
||||
|
||||
@ -10,11 +11,14 @@ describe('Components | Layout', () => {
|
||||
angular.mock.module('ui.router');
|
||||
angular.mock.module('at.lib.services');
|
||||
angular.mock.module('at.lib.components');
|
||||
angular.mock.module('Utilities');
|
||||
angular.mock.module('ngCookies');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject((_$compile_, _$rootScope_) => {
|
||||
beforeEach(angular.mock.inject((_$compile_, _$rootScope_, _$httpBackend_) => {
|
||||
$compile = _$compile_;
|
||||
$rootScope = _$rootScope_;
|
||||
$httpBackend = _$httpBackend_;
|
||||
scope = $rootScope.$new();
|
||||
|
||||
element = angular.element('<at-layout></at-layout>');
|
||||
@ -26,7 +30,15 @@ describe('Components | Layout', () => {
|
||||
let controller;
|
||||
|
||||
beforeEach(() => {
|
||||
const mockResponse = {
|
||||
data: {
|
||||
count: 3
|
||||
}
|
||||
};
|
||||
|
||||
controller = element.controller('atLayout');
|
||||
$httpBackend.when('GET', /admin_of_organizations/)
|
||||
.respond(mockResponse);
|
||||
});
|
||||
|
||||
xit('$scope.$on($stateChangeSuccess) should assign toState name to currentState', () => {
|
||||
|
||||
@ -10,6 +10,8 @@ describe('Components | Side Nav Item', () => {
|
||||
angular.mock.module('ui.router');
|
||||
angular.mock.module('at.lib.services');
|
||||
angular.mock.module('at.lib.components');
|
||||
angular.mock.module('Utilities');
|
||||
angular.mock.module('ngCookies');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject((_$compile_, _$rootScope_) => {
|
||||
|
||||
@ -15,6 +15,8 @@ describe('Components | Side Nav', () => {
|
||||
angular.mock.module('at.lib.components', ($provide) => {
|
||||
$provide.value('$window', windowMock);
|
||||
});
|
||||
angular.mock.module('Utilities');
|
||||
angular.mock.module('ngCookies');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject((_$compile_, _$rootScope_) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user