cartodb-4.42/lib/assets/test/spec/builder/routes/handle-widget-route.spec.js
2024-04-06 05:25:13 +00:00

14 lines
470 B
JavaScript

var handleWidgetRoute = require('builder/routes/handle-widget-route');
describe('routes/handleWidgetRoute', function () {
it('should handle widget route', function () {
const widgetDefinitionsCollection = {
trigger: jasmine.createSpy('trigger')
};
handleWidgetRoute(['widget', 'somewidgetid', null, null], widgetDefinitionsCollection);
expect(widgetDefinitionsCollection.trigger).toHaveBeenCalledWith('setSelected', 'somewidgetid');
});
});