summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-08-10 14:01:32 -0500
committerEric Eastwood <contact@ericeastwood.com>2017-08-14 11:09:20 -0500
commitecb7c534f60f89a57468148f543a6895692b6081 (patch)
treee689314aaff87892d982e62b043b842a4a499af9 /spec
parentf1e1113bf4d107c0ecf3f989f6110b00a83cef2d (diff)
downloadgitlab-ce-ecb7c534f60f89a57468148f543a6895692b6081.tar.gz
Use promise syntax with Helper.getContent
Fix https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12198#note_37143217
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/repo/components/repo_sidebar_spec.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/javascripts/repo/components/repo_sidebar_spec.js b/spec/javascripts/repo/components/repo_sidebar_spec.js
index e8bc8a62240..edd27d3afb8 100644
--- a/spec/javascripts/repo/components/repo_sidebar_spec.js
+++ b/spec/javascripts/repo/components/repo_sidebar_spec.js
@@ -64,9 +64,10 @@ describe('RepoSidebar', () => {
describe('methods', () => {
describe('fileClicked', () => {
it('should fetch data for new file', () => {
- spyOn(Helper, 'getContent');
+ spyOn(Helper, 'getContent').and.callThrough();
const file1 = {
id: 0,
+ url: '',
};
RepoStore.files = [file1];
RepoStore.isRoot = true;
@@ -74,7 +75,7 @@ describe('RepoSidebar', () => {
vm.fileClicked(file1);
- expect(Helper.getContent).toHaveBeenCalledWith(file1, jasmine.any(Function));
+ expect(Helper.getContent).toHaveBeenCalledWith(file1);
});
it('should hide files in directory if already open', () => {