aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec/adopter.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec/adopter.js')
-rw-r--r--spec/spec/adopter.js22
1 files changed, 21 insertions, 1 deletions
diff --git a/spec/spec/adopter.js b/spec/spec/adopter.js
index a8fdd11..a73bc35 100644
--- a/spec/spec/adopter.js
+++ b/spec/spec/adopter.js
@@ -1,10 +1,12 @@
describe('Adopter', function() {
- var path, polyline, polygon
+ var path, polyline, polygon, linearGradient, radialGradient
beforeEach(function() {
path = SVG.get('lineAB')
polyline = SVG.get('inlineSVG').select('polyline').first()
polygon = SVG.get('inlineSVG').select('polygon').first()
+ linearGradient = SVG.get('inlineSVG').select('linearGradient').first()
+ radialGradient = SVG.get('inlineSVG').select('radialGradient').first()
})
describe('with SVG.Doc instance', function() {
@@ -49,6 +51,24 @@ describe('Adopter', function() {
expect(polygon.array() instanceof SVG.PointArray).toBeTruthy()
})
})
+
+ describe('with linear SVG.Gradient instance', function() {
+ it('is instance of SVG.Gradient', function() {
+ expect(linearGradient instanceof SVG.Gradient).toBeTruthy()
+ })
+ it('has type of linear', function() {
+ expect(linearGradient.type).toBe('linearGradient') // actually it should be 'linear'. see #606
+ })
+ })
+
+ describe('with radial SVG.Gradient instance', function() {
+ it('is instance of SVG.Gradient', function() {
+ expect(radialGradient instanceof SVG.Gradient).toBeTruthy()
+ })
+ it('has type of radial', function() {
+ expect(radialGradient.type).toBe('radialGradient') // actually it should be 'radial'. see #606
+ })
+ })
describe('with node that has no matching svg.js class', function() {
it('wraps the node in the base SVG.Element class', function() {