--- /dev/null
+import { Timezone } from "./timezone";
+
+fdescribe('timezone utility', () => {
+ it('includes valid timezones', () => {
+ expect(new Timezone().values()).toContain('America/Chicago');
+ expect(new Timezone().values()).toContain('America/New_York');
+ });
+ it('does not include invalid timezones', () => {
+ expect(new Timezone().values()).not.toContain('MARGARITA TIME!!!');
+ });
+});
--- /dev/null
+import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
+import { EditOuSettingDialogComponent } from "./edit-org-unit-setting-dialog.component";
+
+const mockNgbModal = jasmine.createSpyObj<NgbModal>(['open']);
+let component: EditOuSettingDialogComponent;
+
+fdescribe('EditOuSettingDialogComponent', () => {
+ beforeEach(() => {
+ component = new EditOuSettingDialogComponent(mockNgbModal);
+ })
+ describe('inputType()', () => {
+ it('gets its value from the entry dataType', () => {
+ component.entry = {dataType: 'bool'}
+ expect(component.inputType()).toEqual('bool');
+ });
+ });
+ describe('inputType()', () => {
+ it('returns timezone if the setting name is lib.timezone', () => {
+ component.entry = {dataType: 'string', name: 'lib.timezone'}
+ expect(component.inputType()).toEqual('timezone');
+ });
+ });
+})