/* global google, waitsFor */ describe('shape', function() { var elm, scope; // load the marker 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 set scope.shapes with options ', function() { // scope.shapes expect(Object.keys(scope.map.shapes).length).toEqual(5); // polyline expect(scope.map.shapes.polyline.geodesic).toBe(true); // polygon expect(scope.map.shapes.polygon.strokeColor).toEqual('#FF0000'); // rectangle expect(scope.map.shapes.rectangle.editable).toBe(true); // circle expect(scope.map.shapes.circle.radius).toEqual(4000); // image expect(scope.map.shapes.image.getUrl()).toEqual("https://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg"); }); it('should set shape events', function() { //TODO: should test events, but don't know how to get events of a shape }); it('should set shape observers', function() { //TODO: need to test observers }); });