Skip to content

Commit

Permalink
Fix order of fetchMock in orchestration-template spec
Browse files Browse the repository at this point in the history
  • Loading branch information
rvsia committed Jun 20, 2019
1 parent e4350ab commit ad31ff4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ describe('OrcherstrationTemplate form', () => {
});

it('should render edit variant', (done) => {
const wrapper = mount(<OrcherstrationTemplateForm {...initialProps} otId={123} />);
fetchMock.patchOnce('/api/orchestration_templates/123', {});
fetchMock.getOnce('/api/orchestration_templates/123?attributes=name,description,type,ems_id,draft,content', {
name: 'foo',
content: 'content',
});
const wrapper = mount(<OrcherstrationTemplateForm {...initialProps} otId={123} />);
/**
* async load
*/
Expand Down Expand Up @@ -102,12 +102,12 @@ describe('OrcherstrationTemplate form', () => {
});

it('should render copy variant', (done) => {
const wrapper = mount(<OrcherstrationTemplateForm {...initialProps} otId={123} copy />);
fetchMock.postOnce('/api/orchestration_templates/123', {});
fetchMock.getOnce('/api/orchestration_templates/123?attributes=name,description,type,ems_id,draft,content', {
name: 'foo',
content: 'content',
});
const wrapper = mount(<OrcherstrationTemplateForm {...initialProps} otId={123} copy />);
/**
* async load
*/
Expand Down

0 comments on commit ad31ff4

Please sign in to comment.