climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1496266 - /incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/DatasetSelectCtrlTest.js
Date Mon, 24 Jun 2013 22:58:29 GMT
Author: joyce
Date: Mon Jun 24 22:58:28 2013
New Revision: 1496266

URL: http://svn.apache.org/r1496266
Log:
CLIMATE-152 progress - Add test for shouldDisableClearButton

- Add test for shouldDisableClearButton to DatasetSelectCtrlTest.

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

Modified: incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/DatasetSelectCtrlTest.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/DatasetSelectCtrlTest.js?rev=1496266&r1=1496265&r2=1496266&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/DatasetSelectCtrlTest.js
(original)
+++ incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/DatasetSelectCtrlTest.js
Mon Jun 24 22:58:28 2013
@@ -24,9 +24,16 @@ describe('OCW Controllers', function() {
 	beforeEach(module('ocw.controllers'));
 	beforeEach(module('ocw.services'));
 
-
 	describe('DatasetSelectCtrl', function() {
-		it('', function() {
+		it('should initialize the disable clear button function', function() {
+			inject(function($rootScope, $controller, selectedDatasetInformation) {
+				var scope = $rootScope.$new();
+				var ctrl = $controller('DatasetSelectCtrl', {$scope: scope});
+
+				expect(scope.shouldDisableClearButton()).toBe(true);
+				selectedDatasetInformation.addDataset({});
+				expect(scope.shouldDisableClearButton()).toBe(false);
+			});
 		});
 	});
 });



Mime
View raw message