climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1504018 - /incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js
Date Wed, 17 Jul 2013 06:35:03 GMT
Author: joyce
Date: Wed Jul 17 06:35:02 2013
New Revision: 1504018

URL: http://svn.apache.org/r1504018
Log:
CLIMATE-210 - Add datasets initialization test

- Add test to ensure that dataset information is pulled from the
  selectedDatasetInformation service that was added to SettingsCtrl.js.

Modified:
    incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js

Modified: incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js?rev=1504018&r1=1504017&r2=1504018&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js Wed
Jul 17 06:35:02 2013
@@ -33,5 +33,15 @@ describe('OCW Controllers', function() {
 				expect(Object.keys(scope.settings)).toEqual(["metrics", "temporal", "spatialSelect"]);
 			});
 		});
+
+		it('should pull the dataset information', function() {
+			inject(function($rootScope, $controller) {
+				var scope = $rootScope.$new();
+				var ctrl = $controller("SettingsCtrl", {$scope: scope});
+
+				expect(typeof scope.datasets).toBe('object');
+				expect(Object.keys(scope.datasets).length).toBe(0);
+			});
+		});
 	});
 });



Mime
View raw message