summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-08-23 10:30:09 +0100
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-08-23 10:30:09 +0100
commitf3e4f10de22ce2cbbb5dd830b7dfe0a79f40d1c1 (patch)
tree8d5e3b9f122820cf326b7b4837e93abd48de293e
parentc5b3632f904744dd23d8079caaf44fa3b24e7e1b (diff)
downloadgitlab-ce-f3e4f10de22ce2cbbb5dd830b7dfe0a79f40d1c1.tar.gz
Update repo_commit_section to spy service
-rw-r--r--spec/javascripts/repo/components/repo_commit_section_spec.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/javascripts/repo/components/repo_commit_section_spec.js b/spec/javascripts/repo/components/repo_commit_section_spec.js
index 6f6faf5422b..1cbb4914005 100644
--- a/spec/javascripts/repo/components/repo_commit_section_spec.js
+++ b/spec/javascripts/repo/components/repo_commit_section_spec.js
@@ -1,9 +1,9 @@
import Vue from 'vue';
import repoCommitSection from '~/repo/components/repo_commit_section.vue';
import RepoStore from '~/repo/stores/repo_store';
-import Api from '~/api';
+import RepoService from '~/repo/services/repo_service';
-describe('RepoCommitSection', () => {
+fdescribe('RepoCommitSection', () => {
const branch = 'master';
const projectUrl = 'projectUrl';
const changedFiles = [{
@@ -111,7 +111,7 @@ describe('RepoCommitSection', () => {
expect(submitCommit.disabled).toBeFalsy();
spyOn(vm, 'makeCommit').and.callThrough();
- spyOn(Api, 'commitMultiple').and.callFake(() => Promise.resolve());
+ spyOn(RepoService, 'commitFiles').and.callFake(() => Promise.resolve());
submitCommit.click();
@@ -119,10 +119,9 @@ describe('RepoCommitSection', () => {
expect(vm.makeCommit).toHaveBeenCalled();
expect(submitCommit.querySelector('.fa-spinner.fa-spin')).toBeTruthy();
- const args = Api.commitMultiple.calls.allArgs()[0];
- const { commit_message, actions, branch: payloadBranch } = args[1];
+ const args = RepoService.commitFiles.calls.allArgs()[0];
+ const { commit_message, actions, branch: payloadBranch } = args[0];
- expect(args[0]).toBe(projectId);
expect(commit_message).toBe(commitMessage);
expect(actions.length).toEqual(2);
expect(payloadBranch).toEqual(branch);