+ });
+
+ describe('circles', function () {
+ var svg, radarGraph;
+
+ beforeEach(function () {
+ var radar;
+
+ svg = buildSvg();
+ spyOn(svg, 'append').andReturn(svg);
+ spyOn(svg, 'attr').andReturn(svg);
+
+ radar = new tr.models.Radar();
+ spyOn(radar, 'cycles').andReturn([
+ new tr.models.Cycle('Adopt'),
+ new tr.models.Cycle('Hold')
+ ]);
+ radarGraph = new tr.graphing.Radar(svg, 500, radar);
+ });
+
+ it('plots the circles for the cicles', function () {
+ radarGraph.plot();
+
+ expect(svg.append).toHaveBeenCalledWith('circle');
+ expect(svg.attr).toHaveBeenCalledWith('cx', 500 / 2);
+ expect(svg.attr).toHaveBeenCalledWith('cy', 500 / 2);
+ expect(svg.attr).toHaveBeenCalledWith('r', Math.round(250 / 2));
+
+ expect(svg.append).toHaveBeenCalledWith('circle');
+ expect(svg.attr).toHaveBeenCalledWith('cx', 500 / 2);
+ expect(svg.attr).toHaveBeenCalledWith('cy', 500 / 2);
+ expect(svg.attr).toHaveBeenCalledWith('r', 250);
+ });
+ });