Return-Path: X-Original-To: apmail-climate-commits-archive@minotaur.apache.org Delivered-To: apmail-climate-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 34DC5E34E for ; Mon, 24 Jun 2013 22:58:51 +0000 (UTC) Received: (qmail 76694 invoked by uid 500); 24 Jun 2013 22:58:51 -0000 Delivered-To: apmail-climate-commits-archive@climate.apache.org Received: (qmail 76669 invoked by uid 500); 24 Jun 2013 22:58:51 -0000 Mailing-List: contact commits-help@climate.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@climate.incubator.apache.org Delivered-To: mailing list commits@climate.incubator.apache.org Received: (qmail 76662 invoked by uid 99); 24 Jun 2013 22:58:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jun 2013 22:58:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jun 2013 22:58:49 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 13AE42388C0E; Mon, 24 Jun 2013 22:58:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1496266 - /incubator/climate/trunk/rcmet/src/main/ui/test/unit/controllers/DatasetSelectCtrlTest.js Date: Mon, 24 Jun 2013 22:58:29 -0000 To: commits@climate.incubator.apache.org From: joyce@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130624225829.13AE42388C0E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); + }); }); }); });