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:26 UTC
svn commit: r1494005 -
/incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrl.js
Author: joyce
Date: Tue Jun 18 03:17:25 2013
New Revision: 1494005
URL: http://svn.apache.org/r1494005
Log:
CLIMATE-116 progress - Add slider callback function 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=1494005&r1=1494004&r2=1494005&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:25 2013
@@ -71,5 +71,19 @@ describe('OCW Controllers', function() {
expect(scope.datepickerSettings.changeYear).toBe(true);
});
});
+
+ it('should define the slide "slide" callback functions', function() {
+ inject(function($rootScope, $controller) {
+ var scope = $rootScope.$new();
+ var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
+
+ expect(scope.latSliderVal).toBe(0);
+ expect(scope.lonSliderVal).toBe(0);
+ scope.updateLatSliderDisplayValue(1);
+ scope.updateLonSliderDisplayValue(2);
+ expect(scope.latSliderVal).toBe(1);
+ expect(scope.lonSliderVal).toBe(2);
+ });
+ });
});
});