mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 08:31:43 +03:00
d0e0760dae
refs https://github.com/TryGhost/Ghost/issues/10318 - Because members is effectively "enabled" by default starting Ghost 4.0 have hardcoded labs setting to be such. The alternative of removing this key from labs would be equivalent to `labs.members === false` which is undesireable and would mean additional work on theme developer's side.
28 lines
703 B
JavaScript
28 lines
703 B
JavaScript
const should = require('should');
|
|
const sinon = require('sinon');
|
|
|
|
const labs = require('../../../core/server/services/labs');
|
|
|
|
describe('Labs Service', function () {
|
|
afterEach(function () {
|
|
sinon.restore();
|
|
});
|
|
|
|
it('always returns members true flag', function () {
|
|
labs.getAll().should.eql({
|
|
members: true
|
|
});
|
|
|
|
labs.isSet('members').should.be.true;
|
|
});
|
|
|
|
it('isSet returns false for undefined', function () {
|
|
labs.isSet('bar').should.be.false;
|
|
});
|
|
|
|
it('isSet always returns false for deprecated', function () {
|
|
labs.isSet('subscribers').should.be.false;
|
|
labs.isSet('publicAPI').should.be.false;
|
|
});
|
|
});
|