mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03:30
Update string-related component tests
This commit is contained in:
@@ -130,8 +130,8 @@ describe('Components | Layout', () => {
|
|||||||
expect(_ComponentsStrings_.get).toHaveBeenCalled();
|
expect(_ComponentsStrings_.get).toHaveBeenCalled();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('ComponentsStrings get() method should throw an error if string is not a property name of the layout class', () => {
|
it('ComponentsStrings get() method should return undefined if string is not a property name of the layout class', () => {
|
||||||
expect(controller.getString.bind(null, 'SUBMISSION_ERROR_TITLE')).toThrow();
|
expect(controller.getString('SUBMISSION_ERROR_TITLE')).toBe(undefined);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return layout string', () => {
|
it('should return layout string', () => {
|
||||||
@@ -145,16 +145,6 @@ describe('Components | Layout', () => {
|
|||||||
expect(controller.getString(key)).toBe(value);
|
expect(controller.getString(key)).toBe(value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return default string', () => {
|
|
||||||
const defaultStrings = {
|
|
||||||
BRAND_NAME: 'AWX'
|
|
||||||
};
|
|
||||||
|
|
||||||
_.forEach(defaultStrings, (value, key) => {
|
|
||||||
expect(controller.getString(key)).toBe(value);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user