You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2013/06/24 15:31:08 UTC
svn commit: r1496046 -
/incubator/climate/trunk/rcmet/src/main/ui/test/unit/services/SelectedDatasetInfomationTest.js
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);
+ });
+ });
});
});