add an ol.Tile class
This commit is contained in:
24
test/spec/ol/Tile.test.js
Normal file
24
test/spec/ol/Tile.test.js
Normal file
@@ -0,0 +1,24 @@
|
||||
describe("ol.Tile", function() {
|
||||
|
||||
describe("creating a tile", function() {
|
||||
it("creates a tile instance", function() {
|
||||
var tile = new ol.Tile();
|
||||
expect(tile instanceof ol.Tile).toBe(true);
|
||||
});
|
||||
it("sets an image node in the instance", function() {
|
||||
var tile = new ol.Tile();
|
||||
expect(tile.getImg()).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("setting a source", function() {
|
||||
var tile;
|
||||
beforeEach(function() {
|
||||
tile = new ol.Tile();
|
||||
});
|
||||
it("sets the image source", function() {
|
||||
tile.setImgSrc("http://foo/img");
|
||||
expect(tile.getImg().src).toEqual("http://foo/img");
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user