Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-18 03:10:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-18 03:10:04 +0300
commit35aeb676e824679d7e1ec8772c668b91b1dbc1bc (patch)
tree392f452d92c8a4bb15ea24322ae6532f45912243 /spec/frontend/ide/services
parent43678813e8265b8a00b3039fce155f4c20947a7a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ide/services')
-rw-r--r--spec/frontend/ide/services/index_spec.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/frontend/ide/services/index_spec.js b/spec/frontend/ide/services/index_spec.js
index d2c32a81811..e9bdb9197bb 100644
--- a/spec/frontend/ide/services/index_spec.js
+++ b/spec/frontend/ide/services/index_spec.js
@@ -117,6 +117,21 @@ describe('IDE services', () => {
it('sends a request to file.rawPath', () => {
return services.getRawFileData(file).then(raw => {
+ expect(axios.get).toHaveBeenCalledWith(file.rawPath, {
+ transformResponse: [expect.any(Function)],
+ });
+ expect(raw).toEqual('raw content');
+ });
+ });
+
+ it('returns arraybuffer for binary files', () => {
+ file.binary = true;
+
+ return services.getRawFileData(file).then(raw => {
+ expect(axios.get).toHaveBeenCalledWith(file.rawPath, {
+ transformResponse: [expect.any(Function)],
+ responseType: 'arraybuffer',
+ });
expect(raw).toEqual('raw content');
});
});