From 4b761481ddf78e6f352cd985416fe2f591589989 Mon Sep 17 00:00:00 2001 From: Daniele Piccone Date: Wed, 29 Jul 2015 15:48:05 +0200 Subject: [PATCH] Added test for custom class in the factory function --- spec/core-spec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/core-spec.js b/spec/core-spec.js index 048df38..03fe492 100644 --- a/spec/core-spec.js +++ b/spec/core-spec.js @@ -4,6 +4,7 @@ describe('c3 chart', function () { var chart; var args = { + classname: 'customclass', data: { columns: [ ['data1', 30, 200, 100, 400, 150, 250], @@ -34,6 +35,11 @@ describe('c3 chart', function () { expect(svg).not.toBeNull(); }); + it('should be created with a custom class', function () { + var svg = d3.select('#chart svg'); + expect(svg.attr('class')).not.toBeNull(); + expect(svg.attr('class')).toBe('customclass'); + }); }); describe('size', function () {