cartodb-4.42/lib/assets/test/spec/fixtures/builder/query-geometry-model.fixture.js
2024-04-06 05:25:13 +00:00

22 lines
639 B
JavaScript

var QueryGeometryModel = require('builder/data/query-geometry-model');
var getConfigModelFixture = require('fixtures/builder/config-model.fixture.js');
function getQueryGeometryModelFixture (opts) {
opts = opts || {};
var configModel = opts.configModel || getConfigModelFixture();
var initialStatus = opts.initialStatus || 'unfetched';
var query = opts.query || 'SELECT * FROM wadus';
var model = new QueryGeometryModel({
ready: true,
status: initialStatus,
query: query
}, { configModel: configModel });
model.hasValueAsync = function () {};
return model;
}
module.exports = getQueryGeometryModelFixture;