Author: joyce Date: Mon Jun 24 22:57:51 2013 New Revision: 1496258 URL: http://svn.apache.org/r1496258 Log: CLIMATE-152 progress - Add tests for shouldDisableEvaluateButton Modified: incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrlTest.js Modified: incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrlTest.js URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrlTest.js?rev=1496258&r1=1496257&r2=1496258&view=diff ============================================================================== --- incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrlTest.js (original) +++ incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrlTest.js Mon Jun 24 22:57:51 2013 @@ -131,6 +131,21 @@ describe('OCW Controllers', function() { }); }); + it('should initialize the disable evaluation button function', function() { + inject(function($rootScope, $controller) { + var scope = $rootScope.$new(); + var ctrl = $controller("ParameterSelectCtrl", {$scope: scope}); + + expect(scope.shouldDisableEvaluateButton()).toBe(true); + scope.datasets.push(1); + expect(scope.shouldDisableEvaluateButton()).toBe(true); + scope.datasets.push(2); + expect(scope.shouldDisableEvaluateButton()).toBe(false); + scope.runningEval = true; + expect(scope.shouldDisableEvaluateButton()).toBe(true); + }); + }); + it('should initialize the disable results view function', function() { inject(function($rootScope, $controller) { $rootScope.evalResults = "";