climate-commits mailing list archives

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

URL: http://svn.apache.org/r1494000
Log:
CLIMATE-116 progress - Add regionSelectParams default value 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=1494000&r1=1493999&r2=1494000&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:16:58 2013
@@ -33,5 +33,18 @@ describe('OCW Controllers', function() {
 				expect(Object.keys(scope.datasets).length).toBe(0);
 			});
 		});
+
+		it('should grab the default region select param object from the regionSelectParams service',
function() {
+			inject(function($rootScope, $controller) {
+				var scope = $rootScope.$new();
+				var ctrl = $controller("ParameterSelectCtrl", {$scope: scope});
+
+				// The default display values aren't going to be changing any time soon. This test 
+				// is a bit of a duplicate since this is really testing functionality of the service.
+				// Can't hurt to make sure that we're getting results though!
+				expect(typeof scope.displayParams).toBe('object');
+				expect(Object.keys(scope.displayParams).length).toBe(7);
+			});
+		});
 	});
 });



Mime
View raw message