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:34 UTC
svn commit: r1494008 -
/incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrl.js
Author: joyce
Date: Tue Jun 18 03:17:34 2013
New Revision: 1494008
URL: http://svn.apache.org/r1494008
Log:
CLIMATE-116 progress - Add shouldDisableClearButton 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=1494008&r1=1494007&r2=1494008&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:34 2013
@@ -99,5 +99,17 @@ describe('OCW Controllers', function() {
expect(scope.shouldDisableControls()).toBe(false);
});
});
+
+ it('should initialize the disable clear button function', function() {
+ inject(function($rootScope, $controller) {
+ var scope = $rootScope.$new();
+ var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
+
+ expect(scope.shouldDisableClearButton()).toBe(true);
+ scope.datasets.push(1);
+ scope.datasets.push(2);
+ expect(scope.shouldDisableClearButton()).toBe(false);
+ });
+ });
});
});