From f3b9e808601e8aa250b9373447527ca67ba75ec4 Mon Sep 17 00:00:00 2001 From: wout Date: Thu, 20 Feb 2014 20:10:56 +0100 Subject: SVG.Stop accepts multiple arguments --- spec/spec/gradient.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'spec') diff --git a/spec/spec/gradient.js b/spec/spec/gradient.js index a0e4d98..b84ccb9 100755 --- a/spec/spec/gradient.js +++ b/spec/spec/gradient.js @@ -82,6 +82,19 @@ describe('Gradient', function() { }) expect(gradient.children().length).toBe(2) }) + + it('accepts multiple aruments on fixed positions', function() { + gradient = draw.gradient('linear', function(stop) { + s1 = stop.at(0.11, '#333') + s2 = stop.at(0.94, '#fff', 0.5) + }) + expect(gradient.children().length).toBe(2) + expect(s1.attr('offset')).toBe(0.11) + expect(s1.attr('stop-color')).toBe('#333333') + expect(s2.attr('offset')).toBe(0.94) + expect(s2.attr('stop-color')).toBe('#ffffff') + expect(s2.attr('stop-opacity')).toBe(0.5) + }) }) -- cgit v1.2.3