Skip to content

Commit c18b248

Browse files
committed
fix so_mixin tests
1 parent b130e59 commit c18b248

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

src/legacy/server/saved_objects/saved_objects_mixin.test.js

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ describe('Saved Objects Mixin', () => {
201201

202202
it('should return all but hidden types', async () => {
203203
expect(service).toBeDefined();
204-
expect(service.types).toEqual(['config', 'testtype', 'doc1', 'doc2']);
204+
expect(service.types).toEqual(['testtype', 'doc1', 'doc2']);
205205
});
206206

207207
const mockCallEs = jest.fn();
@@ -215,30 +215,20 @@ describe('Saved Objects Mixin', () => {
215215
it('should create a repository without hidden types', () => {
216216
const repository = service.getSavedObjectsRepository(mockCallEs);
217217
expect(repository).toBeDefined();
218-
expect(repository._allowedTypes).toEqual(['config', 'testtype', 'doc1', 'doc2']);
218+
expect(repository._allowedTypes).toEqual(['testtype', 'doc1', 'doc2']);
219219
});
220220

221221
it('should create a repository with a unique list of allowed types', () => {
222-
const repository = service.getSavedObjectsRepository(mockCallEs, [
223-
'config',
224-
'config',
225-
'config',
226-
]);
227-
expect(repository._allowedTypes).toEqual(['config', 'testtype', 'doc1', 'doc2']);
222+
const repository = service.getSavedObjectsRepository(mockCallEs, ['doc1', 'doc1', 'doc1']);
223+
expect(repository._allowedTypes).toEqual(['testtype', 'doc1', 'doc2']);
228224
});
229225

230226
it('should create a repository with extraTypes minus duplicate', () => {
231227
const repository = service.getSavedObjectsRepository(mockCallEs, [
232228
'hiddentype',
233229
'hiddentype',
234230
]);
235-
expect(repository._allowedTypes).toEqual([
236-
'config',
237-
'testtype',
238-
'doc1',
239-
'doc2',
240-
'hiddentype',
241-
]);
231+
expect(repository._allowedTypes).toEqual(['testtype', 'doc1', 'doc2', 'hiddentype']);
242232
});
243233

244234
it('should not allow a repository without a callCluster function', () => {

0 commit comments

Comments
 (0)