diff --git a/src/dateparser/dateparser.js b/src/dateparser/dateparser.js index 0b4249f85e..43d0193ab9 100644 --- a/src/dateparser/dateparser.js +++ b/src/dateparser/dateparser.js @@ -217,17 +217,3 @@ angular.module('ui.bootstrap.dateparser', []) return true; } }]); - -/* Deprecated dateparser below */ - -angular.module('ui.bootstrap.dateparser') - -.value('$dateParserSuppressWarning', false) - -.service('dateParser', ['$log', '$dateParserSuppressWarning', 'uibDateParser', function($log, $dateParserSuppressWarning, uibDateParser) { - if (!$dateParserSuppressWarning) { - $log.warn('dateParser is now deprecated. Use uibDateParser instead.'); - } - - angular.extend(this, uibDateParser); -}]); diff --git a/src/dateparser/test/dateparser.spec.js b/src/dateparser/test/dateparser.spec.js index fb8897c832..583cb46600 100644 --- a/src/dateparser/test/dateparser.spec.js +++ b/src/dateparser/test/dateparser.spec.js @@ -224,34 +224,3 @@ describe('date parser', function() { expect(dateParser.init).toHaveBeenCalled(); })); }); - -/* Deprecation tests below */ - -describe('date parser deprecation', function() { - beforeEach(module('ui.bootstrap.dateparser')); - - it('should suppress warning', function() { - module(function($provide) { - $provide.value('$dateParserSuppressWarning', true); - }); - - inject(function($log, dateParser) { - spyOn($log, 'warn'); - - dateParser.parse('01.10.2015', 'dd.MM.yyyy'); - - expect($log.warn.calls.count()).toBe(0); - }); - }); - - it('should give warning by default', inject(function($log) { - spyOn($log, 'warn'); - - inject(function(dateParser) { - dateParser.parse('01.10.2015', 'dd.MM.yyyy'); - - expect($log.warn.calls.count()).toBe(1); - expect($log.warn.calls.argsFor(0)).toEqual(['dateParser is now deprecated. Use uibDateParser instead.']); - }); - })); -});