Skip to content

Commit

Permalink
dialog_field_refresh_service_spec - fix spec failures from dialog dat…
Browse files Browse the repository at this point in the history
…a being a string

and a surprising promise mock
  • Loading branch information
himdel committed Nov 4, 2019
1 parent 7a3ae03 commit d46b0ad
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('dialogFieldRefreshService', function() {
};

spyOn(API, 'post').and.callFake(function() {
return {then: function(response) { response(responseResult); }};
return Promise.resolve(responseResult);
});

DialogData.data = {
Expand All @@ -23,7 +23,7 @@ describe('dialogFieldRefreshService', function() {
}));

describe('#refreshField', function() {
var data = 'the data';
var data = { "the field": "data1" };
var field = 'the field';
var url = 'url';
var idList = {
Expand Down Expand Up @@ -53,7 +53,7 @@ describe('dialogFieldRefreshService', function() {
var requestData = {
action: 'refresh_dialog_fields',
resource: {
dialog_fields: 'the data',
dialog_fields: data,
fields: 'the field',
resource_action_id: '321',
target_id: '456',
Expand Down

0 comments on commit d46b0ad

Please sign in to comment.