Skip to content

Commit 696c211

Browse files
committed
Use config and stripped down config
1 parent ce562cf commit 696c211

1 file changed

Lines changed: 18 additions & 11 deletions

File tree

spec/CloudCode.spec.js

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4145,11 +4145,14 @@ describe('saveFile hooks', () => {
41454145
},
41464146
};
41474147
// Get the actual config values that will be used
4148+
const config = Config.get('test');
4149+
41484150
const expectedConfig = {
4149-
applicationId: 'test',
4150-
mount: 'http://localhost:8378/1',
4151-
fileKey: 'test'
4151+
applicationId: config.applicationId,
4152+
mount: config.mount,
4153+
fileKey: config.fileKey
41524154
};
4155+
41534156
expect(createFileSpy).toHaveBeenCalledWith(
41544157
jasmine.any(String),
41554158
newData,
@@ -4183,12 +4186,14 @@ describe('saveFile hooks', () => {
41834186
foo: 'bar',
41844187
},
41854188
};
4186-
// Get the actual config values that will be used
4189+
const config = Config.get('test');
4190+
41874191
const expectedConfig = {
4188-
applicationId: 'test',
4189-
mount: 'http://localhost:8378/1',
4190-
fileKey: 'test'
4192+
applicationId: config.applicationId,
4193+
mount: config.mount,
4194+
fileKey: config.fileKey
41914195
};
4196+
41924197
expect(createFileSpy).toHaveBeenCalledWith(
41934198
jasmine.any(String),
41944199
newData,
@@ -4220,12 +4225,14 @@ describe('saveFile hooks', () => {
42204225
metadata: { foo: 'bar' },
42214226
tags: { bar: 'foo' },
42224227
};
4223-
// Get the actual config values that will be used
4228+
const config = Config.get('test');
4229+
42244230
const expectedConfig = {
4225-
applicationId: 'test',
4226-
mount: 'http://localhost:8378/1',
4227-
fileKey: 'test'
4231+
applicationId: config.applicationId,
4232+
mount: config.mount,
4233+
fileKey: config.fileKey
42284234
};
4235+
42294236
expect(createFileSpy).toHaveBeenCalledWith(
42304237
jasmine.any(String),
42314238
jasmine.any(Buffer),

0 commit comments

Comments
 (0)