Commit ecaa08cc authored by Clement Ho's avatar Clement Ho

Merge branch 'winh-remove-convertPermissionToBoolean' into 'master'

Remove convertPermissionToBoolean() from common_utils.js

See merge request gitlab-org/gitlab-ce!25454
parents a2d7dcae 532d43d5
...@@ -455,21 +455,6 @@ export const historyPushState = newUrl => { ...@@ -455,21 +455,6 @@ export const historyPushState = newUrl => {
*/ */
export const parseBoolean = value => (value && value.toString()) === 'true'; export const parseBoolean = value => (value && value.toString()) === 'true';
/**
* Converts permission provided as strings to booleans.
*
* @param {String} string
* @returns {Boolean}
*/
export const convertPermissionToBoolean = permission => {
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line no-console
console.warn('convertPermissionToBoolean is deprecated! Please use parseBoolean instead.');
}
return parseBoolean(permission);
};
/** /**
* @callback backOffCallback * @callback backOffCallback
* @param {Function} next * @param {Function} next
......
...@@ -409,13 +409,6 @@ describe('common_utils', () => { ...@@ -409,13 +409,6 @@ describe('common_utils', () => {
}); });
}); });
describe('convertPermissionToBoolean', () => {
it('should convert a boolean in a string to a boolean', () => {
expect(commonUtils.convertPermissionToBoolean('true')).toEqual(true);
expect(commonUtils.convertPermissionToBoolean('false')).toEqual(false);
});
});
describe('backOff', () => { describe('backOff', () => {
beforeEach(() => { beforeEach(() => {
// shortcut our timeouts otherwise these tests will take a long time to finish // shortcut our timeouts otherwise these tests will take a long time to finish
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment