climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1494009 - /incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/ParameterSelectCtrl.js
Date Tue, 18 Jun 2013 03:17:38 GMT
Author: joyce
Date: Tue Jun 18 03:17:38 2013
New Revision: 1494009

URL: http://svn.apache.org/r1494009
Log:
CLIMATE-116 progress - Add shouldDisableResultsView 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=1494009&r1=1494008&r2=1494009&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:38 2013
@@ -111,5 +111,20 @@ describe('OCW Controllers', function() {
 				expect(scope.shouldDisableClearButton()).toBe(false);
 			});
 		});
+
+		it('should initialize the disable results view function', function() {
+			inject(function($rootScope, $controller) {
+				$rootScope.evalResults = "";
+				var scope = $rootScope.$new();
+				var ctrl = $controller("ParameterSelectCtrl", {$rootScope: $rootScope, $scope: scope});
+
+				expect(scope.shouldDisableResultsView()).toBe(true);
+
+				// Set evalResults to something other than the default value
+				$rootScope.evalResults = "this is not an empty string";
+
+				expect(scope.shouldDisableResultsView()).toBe(false);
+			});
+		});
 	});
 });



Mime
View raw message