diff options
-rw-r--r-- | app/assets/javascripts/lib/utils/common_utils.js | 15 | ||||
-rw-r--r-- | spec/javascripts/lib/utils/common_utils_spec.js | 7 |
2 files changed, 0 insertions, 22 deletions
diff --git a/app/assets/javascripts/lib/utils/common_utils.js b/app/assets/javascripts/lib/utils/common_utils.js index 29fe460017e..a73cdb73690 100644 --- a/app/assets/javascripts/lib/utils/common_utils.js +++ b/app/assets/javascripts/lib/utils/common_utils.js @@ -456,21 +456,6 @@ export const historyPushState = newUrl => { 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 * @param {Function} next * @param {Function} stop diff --git a/spec/javascripts/lib/utils/common_utils_spec.js b/spec/javascripts/lib/utils/common_utils_spec.js index c02e37950f8..0bb43c94f6a 100644 --- a/spec/javascripts/lib/utils/common_utils_spec.js +++ b/spec/javascripts/lib/utils/common_utils_spec.js @@ -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', () => { beforeEach(() => { // shortcut our timeouts otherwise these tests will take a long time to finish |