Add getId() method for ol.render.Feature
This commit is contained in:
@@ -14,7 +14,7 @@ describe('ol.render.Feature', function() {
|
||||
describe('Constructor', function() {
|
||||
it('creates an instance', function() {
|
||||
renderFeature =
|
||||
new ol.render.Feature(type, flatCoordinates, ends, properties);
|
||||
new ol.render.Feature(type, flatCoordinates, ends, properties, 'foo');
|
||||
expect(renderFeature).to.be.a(ol.render.Feature);
|
||||
});
|
||||
});
|
||||
@@ -57,6 +57,12 @@ describe('ol.render.Feature', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getId()', function() {
|
||||
it('returns the feature id', function() {
|
||||
expect(renderFeature.getId()).to.be('foo');
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getProperties()', function() {
|
||||
it('returns the properties it was created with', function() {
|
||||
expect(renderFeature.getProperties()).to.equal(properties);
|
||||
|
||||
Reference in New Issue
Block a user