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

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

There is a newer version: 0.66.0.1
Show newest version
describe("configuration validation",function(){"use strict";var $rootScope;var $compile;beforeEach(module("ui.bootstrap.datetimepicker"));beforeEach(inject(function(_$compile_,_$rootScope_){$compile=_$compile_;$rootScope=_$rootScope_;$rootScope.date=null}));describe("does not throw exception",function(){it("when no configuration is specified",function(){$compile('')($rootScope)});it("when ng-model value is a valid date string (as if coming from json api)",function(){$rootScope.date="2013-08-04T23:00:00";$compile('')($rootScope);$rootScope.$digest()})});describe("throws exception",function(){it("if ng-model is not specified",function(){function compile(){$compile("")($rootScope);$rootScope.$digest()}expect(compile).toThrow()});it("if invalid option name is specified",function(){function compile(){$compile('')($rootScope);$rootScope.$digest()}expect(compile).toThrow(new Error("Invalid options: minview"))});it("if multiple invalid option names are specified",function(){function compile(){$compile("")($rootScope);$rootScope.$digest()}expect(compile).toThrow(new Error("Invalid options: minview, foo"))})})});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy