cartodb-4.42/lib/assets/test/spec/builder/data/legends/legend-bubble-definition-model.spec.js
2024-04-06 05:25:13 +00:00

36 lines
905 B
JavaScript

var Backbone = require('backbone');
var ConfigModel = require('builder/data/config-model');
var LegendDefinitionModel = require('builder/data/legends/legend-bubble-definition-model');
describe('data/legends/legend-bubble-defintion-model', function () {
var style;
var layerDef1;
beforeEach(function () {
var configModel = new ConfigModel({
base_url: '/u/pepe'
});
layerDef1 = new Backbone.Model({
id: 'fa6cf872-fffa-4301-9a60-849cedba7864',
table_name: 'foo',
autoStyle: false
});
style = new Backbone.Model();
style.hasNoneStyles = function () {
return false;
};
layerDef1.styleModel = style;
this.model = new LegendDefinitionModel(null, {
configModel: configModel,
layerDefinitionModel: layerDef1,
vizId: 'v-123'
});
spyOn(this.model, '_inheritStyleColor');
spyOn(this.model, 'save');
});
});