var cdb = require('cartodb.js-v3');
var FooterView = require('../../../../javascripts/cartodb/common/footer_view_static');
describe('common/footer_view_static', function () {
beforeEach(function () {
this.view = new FooterView();
});
describe('.render', function () {
it('should render properly', function () {
this.view.render();
expect(this.view.$el.html()).toContain('
');
expect(this.view.$el.html()).not.toContain('Version:');
expect(this.view.$el.html()).toContain('');
});
});
describe('is hosted', function () {
it('should render properly', function () {
cdb.config.set('cartodb_com_hosted', true);
this.view.render();
expect(this.view.$el.html()).not.toContain('');
});
});
describe('onpremises', function () {
it('should render properly', function () {
cdb.config.set('onpremise_version', '1.0.0');
this.view.render();
expect(this.view.$el.html()).toContain('Version: 1.0.0');
expect(this.view.$el.html()).toContain('');
});
});
it('should not have leaks', function () {
expect(this.view).toHaveNoLeaks();
});
});