Skip to content

Commit 715ea9b

Browse files
committed
Reduce test expectations to only check application Id
1 parent 6908e00 commit 715ea9b

1 file changed

Lines changed: 5 additions & 18 deletions

File tree

spec/CloudCode.spec.js

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4144,19 +4144,13 @@ describe('saveFile hooks', () => {
41444144
foo: 'bar',
41454145
},
41464146
};
4147-
// Get the actual config values that will be used
4148-
const config = Config.get('test');
4149-
4150-
if (!config.mount){
4151-
config.mount = 'http://localhost:8378/1'; // Default mount for tests
4152-
}
41534147

41544148
expect(createFileSpy).toHaveBeenCalledWith(
41554149
jasmine.any(String),
41564150
newData,
41574151
'text/plain',
41584152
newOptions,
4159-
config
4153+
jasmine.objectContaining({ applicationId: 'test' })
41604154
);
41614155
});
41624156

@@ -4184,18 +4178,15 @@ describe('saveFile hooks', () => {
41844178
foo: 'bar',
41854179
},
41864180
};
4187-
const config = Config.get('test');
4188-
4189-
if (!config.mount){
4190-
config.mount = 'http://localhost:8378/1'; // Default mount for tests
4191-
}
41924181

41934182
expect(createFileSpy).toHaveBeenCalledWith(
41944183
jasmine.any(String),
41954184
newData,
41964185
newContentType,
41974186
newOptions,
4198-
config
4187+
jasmine.objectContaining({
4188+
applicationId: 'test'
4189+
})
41994190
);
42004191
const expectedFileName = 'donald_duck.pdf';
42014192
expect(file._name.indexOf(expectedFileName)).toBe(file._name.length - expectedFileName.length);
@@ -4221,18 +4212,14 @@ describe('saveFile hooks', () => {
42214212
metadata: { foo: 'bar' },
42224213
tags: { bar: 'foo' },
42234214
};
4224-
const config = Config.get('test');
42254215

4226-
if (!config.mount){
4227-
config.mount = 'http://localhost:8378/1'; // Default mount for tests
4228-
}
42294216

42304217
expect(createFileSpy).toHaveBeenCalledWith(
42314218
jasmine.any(String),
42324219
jasmine.any(Buffer),
42334220
'text/plain',
42344221
options,
4235-
config
4222+
jasmine.objectContaining({ applicationId: 'test' })
42364223
);
42374224
});
42384225

0 commit comments

Comments
 (0)