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

20 lines
602 B
JavaScript

var QuerySchemaModel = require('builder/data/query-schema-model');
var getConfigModelFixture = require('fixtures/builder/config-model.fixture.js');
function getQuerySchemaModelFixture (opts) {
opts = opts || {};
var configModel = opts.configModel || getConfigModelFixture();
var initialStatus = opts.initialStatus || 'initial';
var query = opts.hasOwnProperty('query')
? opts.query
: 'SELECT * FROM wadus';
return new QuerySchemaModel({
ready: true,
status: initialStatus,
query: query
}, { configModel: configModel });
}
module.exports = getQuerySchemaModelFixture;