2021-03-01 21:32:32 +00:00
|
|
|
import * as models from '../../models';
|
2021-03-17 22:37:32 +00:00
|
|
|
import { WorkspaceScopeKeys } from '../../models/workspace';
|
2021-07-22 23:04:56 +00:00
|
|
|
import { getWorkspaceLabel } from '../get-workspace-label';
|
|
|
|
import { strings } from '../strings';
|
2021-03-01 21:32:32 +00:00
|
|
|
|
|
|
|
describe('getWorkspaceLabel', () => {
|
|
|
|
it('should return document label', () => {
|
|
|
|
const w = models.workspace.init();
|
2021-03-17 22:37:32 +00:00
|
|
|
w.scope = WorkspaceScopeKeys.design;
|
2021-03-01 21:32:32 +00:00
|
|
|
expect(getWorkspaceLabel(w)).toBe(strings.document);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should return collection label', () => {
|
|
|
|
const w = models.workspace.init();
|
2021-03-17 22:37:32 +00:00
|
|
|
w.scope = WorkspaceScopeKeys.collection;
|
2021-03-01 21:32:32 +00:00
|
|
|
expect(getWorkspaceLabel(w)).toBe(strings.collection);
|
|
|
|
});
|
|
|
|
});
|