climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1494002 - /incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrl.js
Date Tue, 18 Jun 2013 03:17:07 GMT
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);
+			});
+		});
 	});
 });



Mime
View raw message