You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2013/06/18 05:17:07 UTC
svn commit: r1494002 -
/incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrl.js
Author: joyce
Date: Tue Jun 18 03:17:06 2013
New Revision: 1494002
URL: http://svn.apache.org/r1494002
Log:
CLIMATE-116 progress - Add datepicker settings test
Modified:
incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrl.js
Modified: incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrl.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrl.js?rev=1494002&r1=1494001&r2=1494002&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrl.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrl.js Tue Jun 18 03:17:06 2013
@@ -58,5 +58,18 @@ describe('OCW Controllers', function() {
expect(scope.lonSliderVal).toBe(0);
});
});
+
+ it('should set the default datepicker settings', function() {
+ inject(function($rootScope, $controller) {
+ var scope = $rootScope.$new();
+ var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
+
+ // This tests the default values that get passed to the datepicker objects that we
+ // initialize with a directive.
+ expect(Object.keys(scope.datepickerSettings).length).toBe(2);
+ expect(scope.datepickerSettings.changeMonth).toBe(true);
+ expect(scope.datepickerSettings.changeYear).toBe(true);
+ });
+ });
});
});