fix tests failures (#8422)

* fix tests failures

* make sure _meta is not public

* fix typo

* fix typo
This commit is contained in:
Matteo Pagliazzi
2017-01-18 20:17:56 +01:00
committed by GitHub
parent 4bf4c3a6c2
commit 68f4275c44
8 changed files with 36 additions and 5 deletions

View File

@@ -170,15 +170,19 @@ describe('Group Model', () => {
});
context('Boss Quests', () => {
let sendChatStub;
beforeEach(async () => {
party.quest.key = 'whale';
await party.startQuest(questLeader);
await party.save();
sandbox.stub(Group.prototype, 'sendChat');
sendChatStub = sandbox.stub(Group.prototype, 'sendChat');
});
afterEach(() => sendChatStub.restore());
it('applies user\'s progress to quest boss hp', async () => {
await Group.processQuestProgress(participatingMember, progress);
@@ -322,15 +326,19 @@ describe('Group Model', () => {
});
context('Collection Quests', () => {
let sendChatStub;
beforeEach(async () => {
party.quest.key = 'atom1';
await party.startQuest(questLeader);
await party.save();
sandbox.stub(Group.prototype, 'sendChat');
sendChatStub = sandbox.stub(Group.prototype, 'sendChat');
});
afterEach(() => sendChatStub.restore());
it('applies user\'s progress to found quest items', async () => {
await Group.processQuestProgress(participatingMember, progress);