Skip to content

Commit

Permalink
stubbed out test
Browse files Browse the repository at this point in the history
  • Loading branch information
jgravois committed Nov 9, 2016
1 parent 0353e29 commit d8f33ed
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion spec/Layers/DynamicMapLayerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ describe('L.esri.DynamicMapLayer', function () {
server.respond();
});

it('should bring itself to the front', function (done) {
it('should bring itself to the back', function (done) {
layer.on('load', function () {
var spy = sinon.spy(layer._currentImage, 'bringToBack');
layer.bringToBack();
Expand Down Expand Up @@ -322,6 +322,28 @@ describe('L.esri.DynamicMapLayer', function () {
expect(spy.getCall(0).args[0]).to.match(new RegExp(/http:\/\/services.arcgis.com\/mock\/arcgis\/rest\/services\/MockMapService\/MapServer\/export\?bbox=-?\d+\.\d+%2C-?\d+\.\d+%2C-?\d+\.\d+%2C-?\d+\.\d+&size=500%2C500&dpi=96&format=png24&transparent=true&bboxSR=3857&imageSR=3857&f=image/));
});

// it('should be able to request an image using a proxy', function (done) {
// server.respondWith('GET', new RegExp(/\.\/proxy\?http:\/\/services.arcgis.com\/mock\/arcgis\/rest\/services\/MockMapService\/MapServer\/export\?bbox=-?\d+\.\d+%2C-?\d+\.\d+%2C-?\d+\.\d+%2C-?\d+\.\d+&size=500%2C500&dpi=96&format=png24&transparent=true&bboxSR=3857&imageSR=3857&f=json/), JSON.stringify({
// href: 'http://services.arcgis.com/mock/arcgis/rest/directories/arcgisoutput/Census_MapServer/_ags_mapec70f175eca3415a97c0db6779ad9976.png',
// height: 421,
// width: 1675,
// scale: 18055.95482153688
// }));

// var proxiedLayer = L.esri.dynamicMapLayer({
// url: url,
// proxy: './proxy.ashx'
// });

// proxiedLayer.once('load', function () {
// expect(proxiedLayer._currentImage._url).to.equal('foo');
// done();
// });

// proxiedLayer.addTo(map);
// server.respond();
// });

it('should be able to parse real base64 images from the export service', function (done) {
server.respondWith('GET', new RegExp(/http:\/\/services.arcgis.com\/mock\/arcgis\/rest\/services\/MockMapService\/MapServer\/export\?bbox=-?\d+\.\d+%2C-?\d+\.\d+%2C-?\d+\.\d+%2C-?\d+\.\d+&size=500%2C500&dpi=96&format=png24&transparent=true&bboxSR=3857&imageSR=3857&f=json/), JSON.stringify({
imageData: base64Image,
Expand Down

0 comments on commit d8f33ed

Please sign in to comment.