Skip to content

Commit 6114fbf

Browse files
committed
Use config and stripped down config
1 parent ff23067 commit 6114fbf

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

spec/CloudCode.spec.js

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3696,11 +3696,14 @@ describe('saveFile hooks', () => {
36963696
},
36973697
};
36983698
// Get the actual config values that will be used
3699+
const config = Config.get('test');
3700+
36993701
const expectedConfig = {
3700-
applicationId: 'test',
3701-
mount: 'http://localhost:8378/1',
3702-
fileKey: 'test'
3702+
applicationId: config.applicationId,
3703+
mount: config.mount,
3704+
fileKey: config.fileKey
37033705
};
3706+
37043707
expect(createFileSpy).toHaveBeenCalledWith(
37053708
jasmine.any(String),
37063709
newData,
@@ -3734,12 +3737,14 @@ describe('saveFile hooks', () => {
37343737
foo: 'bar',
37353738
},
37363739
};
3737-
// Get the actual config values that will be used
3740+
const config = Config.get('test');
3741+
37383742
const expectedConfig = {
3739-
applicationId: 'test',
3740-
mount: 'http://localhost:8378/1',
3741-
fileKey: 'test'
3743+
applicationId: config.applicationId,
3744+
mount: config.mount,
3745+
fileKey: config.fileKey
37423746
};
3747+
37433748
expect(createFileSpy).toHaveBeenCalledWith(
37443749
jasmine.any(String),
37453750
newData,
@@ -3771,12 +3776,14 @@ describe('saveFile hooks', () => {
37713776
metadata: { foo: 'bar' },
37723777
tags: { bar: 'foo' },
37733778
};
3774-
// Get the actual config values that will be used
3779+
const config = Config.get('test');
3780+
37753781
const expectedConfig = {
3776-
applicationId: 'test',
3777-
mount: 'http://localhost:8378/1',
3778-
fileKey: 'test'
3782+
applicationId: config.applicationId,
3783+
mount: config.mount,
3784+
fileKey: config.fileKey
37793785
};
3786+
37803787
expect(createFileSpy).toHaveBeenCalledWith(
37813788
jasmine.any(String),
37823789
jasmine.any(Buffer),

0 commit comments

Comments
 (0)