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/25 00:58:29 UTC
svn commit: r1496266 -
/incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/DatasetSelectCtrlTest.js
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);
+ });
});
});
});