cartodb-4.42/lib/assets/test/spec/builder/data/assets-collection.spec.js
2024-04-06 05:25:13 +00:00

24 lines
628 B
JavaScript

var Backbone = require('backbone');
var AssetsCollection = require('builder/data/assets-collection');
describe('data/assets-collection', function () {
beforeEach(function () {
var configModel = new Backbone.Model({
base_url: 'a_url'
});
configModel.urlVersion = function () { return 'v808'; };
this.collection = new AssetsCollection(null, {
configModel: configModel,
userModel: new Backbone.Model({
id: 707
})
});
});
it('should form url properly', function () {
var url = this.collection.url();
expect(url).toBe('a_url/api/v808/users/707/assets');
});
});