Skip to content

Commit 6908e00

Browse files
committed
Revert to full config
1 parent 696c211 commit 6908e00

1 file changed

Lines changed: 12 additions & 18 deletions

File tree

spec/CloudCode.spec.js

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4147,18 +4147,16 @@ describe('saveFile hooks', () => {
41474147
// Get the actual config values that will be used
41484148
const config = Config.get('test');
41494149

4150-
const expectedConfig = {
4151-
applicationId: config.applicationId,
4152-
mount: config.mount,
4153-
fileKey: config.fileKey
4154-
};
4150+
if (!config.mount){
4151+
config.mount = 'http://localhost:8378/1'; // Default mount for tests
4152+
}
41554153

41564154
expect(createFileSpy).toHaveBeenCalledWith(
41574155
jasmine.any(String),
41584156
newData,
41594157
'text/plain',
41604158
newOptions,
4161-
expectedConfig
4159+
config
41624160
);
41634161
});
41644162

@@ -4188,18 +4186,16 @@ describe('saveFile hooks', () => {
41884186
};
41894187
const config = Config.get('test');
41904188

4191-
const expectedConfig = {
4192-
applicationId: config.applicationId,
4193-
mount: config.mount,
4194-
fileKey: config.fileKey
4195-
};
4189+
if (!config.mount){
4190+
config.mount = 'http://localhost:8378/1'; // Default mount for tests
4191+
}
41964192

41974193
expect(createFileSpy).toHaveBeenCalledWith(
41984194
jasmine.any(String),
41994195
newData,
42004196
newContentType,
42014197
newOptions,
4202-
expectedConfig
4198+
config
42034199
);
42044200
const expectedFileName = 'donald_duck.pdf';
42054201
expect(file._name.indexOf(expectedFileName)).toBe(file._name.length - expectedFileName.length);
@@ -4227,18 +4223,16 @@ describe('saveFile hooks', () => {
42274223
};
42284224
const config = Config.get('test');
42294225

4230-
const expectedConfig = {
4231-
applicationId: config.applicationId,
4232-
mount: config.mount,
4233-
fileKey: config.fileKey
4234-
};
4226+
if (!config.mount){
4227+
config.mount = 'http://localhost:8378/1'; // Default mount for tests
4228+
}
42354229

42364230
expect(createFileSpy).toHaveBeenCalledWith(
42374231
jasmine.any(String),
42384232
jasmine.any(Buffer),
42394233
'text/plain',
42404234
options,
4241-
expectedConfig
4235+
config
42424236
);
42434237
});
42444238

0 commit comments

Comments
 (0)