diff options
author | wout <wout@impinc.co.uk> | 2014-02-20 20:10:56 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-02-20 20:10:56 +0100 |
commit | f3b9e808601e8aa250b9373447527ca67ba75ec4 (patch) | |
tree | d76822650cae302be46f8f71908fb868f1754c0c /spec | |
parent | 2a986d0e0c78b7cdf1c96a737a050f4a764f0ce2 (diff) | |
download | svg.js-f3b9e808601e8aa250b9373447527ca67ba75ec4.tar.gz svg.js-f3b9e808601e8aa250b9373447527ca67ba75ec4.zip |
SVG.Stop accepts multiple arguments1.0.0-rc.6
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/spec/gradient.js | 13 |
1 files changed, 13 insertions, 0 deletions
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) + }) }) |