cartodb-4.42/lib/assets/test/spec/builder/data/config-model.spec.js

30 lines
690 B
JavaScript
Raw Normal View History

2024-04-06 13:25:13 +08:00
var ConfigModel = require('builder/data/config-model');
describe('data/config-model', function () {
beforeEach(function () {
this.model = new ConfigModel();
});
describe('.urlVersion', function () {
beforeEach(function () {
this.version = this.model.urlVersion();
});
it('should return v1 by default', function () {
expect(this.version).toEqual('v1');
});
});
describe('.getSqlApiUrl', function () {
beforeEach(function () {
this.url = this.model.getSqlApiUrl();
});
it('should return a API url', function () {
expect(this.url).toEqual(jasmine.any(String));
expect(this.url).toContain('/sql');
});
});
});