Skip to content

Commit

Permalink
DialogUser specs - mock DialogData.data
Browse files Browse the repository at this point in the history
  • Loading branch information
himdel committed Nov 4, 2019
1 parent 178a283 commit 7a3ae03
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Expand Up @@ -7,7 +7,8 @@ describe('dialogUserController', function() {
_API_,
_dialogFieldRefreshService_,
_dialogUserSubmitErrorHandlerService_,
_miqService_) {
_miqService_,
DialogData) {
API = _API_;
dialogFieldRefreshService = _dialogFieldRefreshService_;
dialogUserSubmitErrorHandlerService = _dialogUserSubmitErrorHandlerService_;
Expand Down Expand Up @@ -44,6 +45,10 @@ describe('dialogUserController', function() {
openUrl: false,
dialogReplaceData: null,
});

DialogData.data = {
fields: {},
};
}));

describe('$onInit', function() {
Expand Down
Expand Up @@ -3,7 +3,7 @@ describe('dialogFieldRefreshService', function() {

beforeEach(module('ManageIQ'));

beforeEach(inject(function(dialogFieldRefreshService, _API_) {
beforeEach(inject(function(dialogFieldRefreshService, _API_, DialogData) {
testDialogFieldRefreshService = dialogFieldRefreshService;
API = _API_;

Expand All @@ -16,6 +16,10 @@ describe('dialogFieldRefreshService', function() {
spyOn(API, 'post').and.callFake(function() {
return {then: function(response) { response(responseResult); }};
});

DialogData.data = {
fields: {},
};
}));

describe('#refreshField', function() {
Expand Down

0 comments on commit 7a3ae03

Please sign in to comment.