Skip to content

Commit 46e277b

Browse files
committed
Reduce test expectations to only check application Id
1 parent 7319884 commit 46e277b

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

spec/CloudCode.spec.js

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3695,19 +3695,13 @@ describe('saveFile hooks', () => {
36953695
foo: 'bar',
36963696
},
36973697
};
3698-
// Get the actual config values that will be used
3699-
const config = Config.get('test');
3700-
3701-
if (!config.mount){
3702-
config.mount = 'http://localhost:8378/1'; // Default mount for tests
3703-
}
37043698

37053699
expect(createFileSpy).toHaveBeenCalledWith(
37063700
jasmine.any(String),
37073701
newData,
37083702
'text/plain',
37093703
newOptions,
3710-
config
3704+
jasmine.objectContaining({ applicationId: 'test' })
37113705
);
37123706
});
37133707

@@ -3735,18 +3729,15 @@ describe('saveFile hooks', () => {
37353729
foo: 'bar',
37363730
},
37373731
};
3738-
const config = Config.get('test');
3739-
3740-
if (!config.mount){
3741-
config.mount = 'http://localhost:8378/1'; // Default mount for tests
3742-
}
37433732

37443733
expect(createFileSpy).toHaveBeenCalledWith(
37453734
jasmine.any(String),
37463735
newData,
37473736
newContentType,
37483737
newOptions,
3749-
config
3738+
jasmine.objectContaining({
3739+
applicationId: 'test'
3740+
})
37503741
);
37513742
const expectedFileName = 'donald_duck.pdf';
37523743
expect(file._name.indexOf(expectedFileName)).toBe(file._name.length - expectedFileName.length);
@@ -3772,18 +3763,14 @@ describe('saveFile hooks', () => {
37723763
metadata: { foo: 'bar' },
37733764
tags: { bar: 'foo' },
37743765
};
3775-
const config = Config.get('test');
37763766

3777-
if (!config.mount){
3778-
config.mount = 'http://localhost:8378/1'; // Default mount for tests
3779-
}
37803767

37813768
expect(createFileSpy).toHaveBeenCalledWith(
37823769
jasmine.any(String),
37833770
jasmine.any(Buffer),
37843771
'text/plain',
37853772
options,
3786-
config
3773+
jasmine.objectContaining({ applicationId: 'test' })
37873774
);
37883775
});
37893776

0 commit comments

Comments
 (0)