/* global google, waitsFor */ /* mock Attr2Options, knowns as parser */ describe('map', function() { var elm, scope; // load the tabs code beforeEach(function() { module('ngMap'); inject(function($rootScope, $compile) { elm = angular.element( ''); scope = $rootScope; $compile(elm)(scope); scope.$digest(); waitsFor(function() { return scope.map; }); }); }); it('should prepend a div tag', function() { var divTag = elm.find('div'); expect(scope.map.getDiv()).toBe(divTag[0]); }); it('should set map options', function() { expect(scope.map.getZoom()).toEqual(11); expect(scope.map.mapTypeId).toBe(google.maps.MapTypeId.TERRAIN); }); it('should set map controls', function() { expect(scope.map.zoomControl).toBe(true); expect(scope.map.zoomControlOptions.style).toBe(google.maps.ZoomControlStyle.SMALL); expect(scope.map.zoomControlOptions.position).toBe(google.maps.ControlPosition.BOTTOM_LEFT); }); it('should set events', function() { //TODO: need to test events, but don't know how to detect event in a map }); it('should set observers', function() { //TODO: need to test observers }); });