All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bower_components.angular-bootstrap-datetimepicker.test.configuration.datetimepickerConfig.spec.min.js Maven / Gradle / Ivy

There is a newer version: 0.66.0.1
Show newest version
describe("dateimePickerConfig",function(){"use strict";var $rootScope;var $compile;beforeEach(module("ui.bootstrap.datetimepicker"));beforeEach(inject(function(_$compile_,_$rootScope_){moment.locale("en");$compile=_$compile_;$rootScope=_$rootScope_}));describe("retrieves information from",function(){it("function on scope",function(){var $scope=$rootScope.$new();$scope.date=moment("2014-11-15T00:00:00.000").toDate();$scope.configFunction=function configFunction(){return{startView:"month"}};spyOn($scope,"configFunction").and.callThrough();var element=$compile('')($scope);$scope.$digest();expect(jQuery(".switch",element).text()).toBe("2014");expect($scope.configFunction).toHaveBeenCalled()});it("property on scope",function(){var $scope=$rootScope.$new();$scope.date=moment("2014-11-15T00:00:00.000").toDate();$scope.config={datetimePicker:{startView:"year"}};spyOn($scope,"config").and.callThrough();var element=$compile('')($scope);$scope.$digest();expect(jQuery(".switch",element).text()).toBe("2010-2019")})})});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy