Skip to content

Commit

Permalink
✅ AttributionControl editLink rel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciuskneves authored and Asheem Mamoowala committed Apr 25, 2019
1 parent d6bc113 commit ad7c550
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/unit/ui/control/attribution.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ test('AttributionControl has the correct edit map link', (t) => {
map.addLayer({ id: '1', type: 'fill', source: '1' });
map.on('data', (e) => {
if (e.dataType === 'source' && e.sourceDataType === 'metadata') {
t.equal(attribution._editLink.rel, 'noopener nofollow');
t.equal(attribution._editLink.href, 'https://feedback.com/?owner=mapbox&id=streets-v10&access_token=pk.123#/0/0/0', 'edit link contains map location data');
map.setZoom(2);
t.equal(attribution._editLink.href, 'https://feedback.com/?owner=mapbox&id=streets-v10&access_token=pk.123#/0/0/2', 'edit link updates on mapmove');
Expand Down

0 comments on commit ad7c550

Please sign in to comment.