META-INF.resources.bower_components.angular-bootstrap-datetimepicker.test.configuration.configurationValidation.spec.min.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-bootstrap-date-time-picker Show documentation
Show all versions of jwebmp-bootstrap-date-time-picker Show documentation
The JWebSwing implementation for Bootstrap Date Time Picker
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"))})})});