Skip to content

Commit

Permalink
Add unit test for icon tag with no image CesiumGS#5819
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Bernstein committed Sep 14, 2017
1 parent 8898faf commit 515de90
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Specs/DataSources/KmlDataSourceSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,18 @@ defineSuite([
});
});

it('if load contains <icon> tag with no image included, no image is added', function() {
var dataSource = new KmlDataSource(options);
return loadBlob('Data/KML/simpleNoIcon.kml').then(function(blob) {
return dataSource.load(blob);
}).then(function(source) {
expect(source.entities);
expect(source.entities.values.length).toEqual(1);
expect(source.entities._entities._array.length).toEqual(1);
expect(!source.entities._entities._array[0]._billboard._image);
});
});

it('sets DataSource name from Document', function() {
var kml = '<?xml version="1.0" encoding="UTF-8"?>\
<Document>\
Expand Down

0 comments on commit 515de90

Please sign in to comment.