From 0294918eb97c4b0ab1bdf72ec2fd0b3b3e469254 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Tue, 14 Sep 2021 10:19:26 +0100 Subject: [PATCH] Fixed labs service unit tests refs https://github.com/TryGhost/Ghost/commit/d735e3a4f36d41c984bed81e2b7225fa5215bfb5 refs https://github.com/TryGhost/Ghost/commit/c7972c20a50a4c87c088ec17c6bb2101fb22d2d7 - the unit tests are currently tied to the labs service data rather than testing independent behaviour meaning that the test needs to be updated when the particular alpha flag they are tied to gets removed --- test/unit/services/labs.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/unit/services/labs.test.js b/test/unit/services/labs.test.js index 5e99bd9c33..591d12a911 100644 --- a/test/unit/services/labs.test.js +++ b/test/unit/services/labs.test.js @@ -22,16 +22,16 @@ describe('Labs Service', function () { sinon.stub(process.env, 'NODE_ENV').value('production'); sinon.stub(settingsCache, 'get'); settingsCache.get.withArgs('labs').returns({ - dashboardTwo: true + emailOnlyPosts: true }); labs.getAll().should.eql({ - dashboardTwo: true, + emailOnlyPosts: true, members: true }); labs.isSet('members').should.be.true; - labs.isSet('dashboardTwo').should.be.true; + labs.isSet('emailOnlyPosts').should.be.true; }); it('returns a falsy alpha flag when dev experiments in NOT toggled', function () { @@ -39,7 +39,7 @@ describe('Labs Service', function () { sinon.stub(process.env, 'NODE_ENV').value('production'); sinon.stub(settingsCache, 'get'); settingsCache.get.withArgs('labs').returns({ - dashboardTwo: true + emailOnlyPosts: true }); labs.getAll().should.eql({ @@ -47,7 +47,7 @@ describe('Labs Service', function () { }); labs.isSet('members').should.be.true; - labs.isSet('dashboardTwo').should.be.false; + labs.isSet('emailOnlyPosts').should.be.false; }); it('members flag is true when members_signup_access setting is "all"', function () {