climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1496046 - /incubator/climate/trunk/rcmet/src/main/ui/test/unit/services/SelectedDatasetInfomationTest.js
Date Mon, 24 Jun 2013 13:31:08 GMT
Author: joyce
Date: Mon Jun 24 13:31:08 2013
New Revision: 1496046

URL: http://svn.apache.org/r1496046
Log:
Resolved CLIMATE-148 - Add tests for SelectedDatasetInformation service

- Add clearDatasets test.

Modified:
    incubator/climate/trunk/rcmet/src/main/ui/test/unit/services/SelectedDatasetInfomationTest.js

Modified: incubator/climate/trunk/rcmet/src/main/ui/test/unit/services/SelectedDatasetInfomationTest.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/test/unit/services/SelectedDatasetInfomationTest.js?rev=1496046&r1=1496045&r2=1496046&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/test/unit/services/SelectedDatasetInfomationTest.js
(original)
+++ incubator/climate/trunk/rcmet/src/main/ui/test/unit/services/SelectedDatasetInfomationTest.js
Mon Jun 24 13:31:08 2013
@@ -74,6 +74,16 @@ describe('OCW Services', function() {
 				expect(selectedDatasetInformation.getDatasets()[0]).toEqual(2);
 			});
 		});
+
+		it('should provide the clearDatasets function', function() {
+			inject(function(selectedDatasetInformation) {
+				selectedDatasetInformation.addDataset({});
+				expect(selectedDatasetInformation.getDatasetCount()).toEqual(1);
+
+				selectedDatasetInformation.clearDatasets();
+				expect(selectedDatasetInformation.getDatasetCount()).toEqual(0);
+			});
+		});
 	});
 });
 



Mime
View raw message