Commit b46cb345 authored by derek-knox's avatar derek-knox

Fix tests, submit content branch portion

parent dd2d9a7f
......@@ -34,6 +34,9 @@ export const savedContentMeta = {
};
export const submitChangesError = 'Could not save changes';
export const commitBranchResponse = {
web_url: '/tree/root-master-patch-88195',
};
export const commitMultipleResponse = {
short_id: 'ed899a2f4b5',
web_url: '/commit/ed899a2f4b5',
......
......@@ -13,6 +13,7 @@ import submitContentChanges from '~/static_site_editor/services/submit_content_c
import {
username,
projectId,
commitBranchResponse,
commitMultipleResponse,
createMergeRequestResponse,
sourcePath,
......@@ -26,7 +27,7 @@ describe('submitContentChanges', () => {
const branch = 'branch-name';
beforeEach(() => {
jest.spyOn(Api, 'createBranch').mockResolvedValue();
jest.spyOn(Api, 'createBranch').mockResolvedValue({ data: commitBranchResponse });
jest.spyOn(Api, 'commitMultiple').mockResolvedValue({ data: commitMultipleResponse });
jest
.spyOn(Api, 'createProjectMergeRequest')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment