climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1501564 - /incubator/climate/trunk/rcmet/src/main/ui/test/unit/directives/PreviewMapTest.js
Date Tue, 09 Jul 2013 21:21:12 GMT
Author: joyce
Date: Tue Jul  9 21:21:11 2013
New Revision: 1501564

URL: http://svn.apache.org/r1501564
Log:
CLIMATE-184 progress - Add proper binding test to PreviewMapTest.js

Modified:
    incubator/climate/trunk/rcmet/src/main/ui/test/unit/directives/PreviewMapTest.js

Modified: incubator/climate/trunk/rcmet/src/main/ui/test/unit/directives/PreviewMapTest.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/test/unit/directives/PreviewMapTest.js?rev=1501564&r1=1501563&r2=1501564&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/test/unit/directives/PreviewMapTest.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/test/unit/directives/PreviewMapTest.js Tue Jul
 9 21:21:11 2013
@@ -33,5 +33,16 @@ describe('directives', function() {
 				expect(element.hasClass("preview-map")).toBeTruthy();
 			});
 		});
+
+		it('should set the id of the template to the name of the dataset', function() {
+			inject(function($compile, $rootScope) {
+				$rootScope.dataset = {latlonVals: {latMax: 90, lonMax: 90, latMin: -90, lonMin: -90},
name: "TRMM"};
+				$rootScope.$digest();
+
+				var element = $compile('<div preview-map="dataset"></div>')($rootScope);
+
+				expect(element.attr('id')).toEqual("{{dataset.name}}");
+			});
+		});
 	});
 });



Mime
View raw message