mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Add questInvited option to webhook model
This commit is contained in:
@@ -43,6 +43,7 @@ describe('webhooks', () => {
|
|||||||
options: {
|
options: {
|
||||||
questStarted: true,
|
questStarted: true,
|
||||||
questFinised: true,
|
questFinised: true,
|
||||||
|
questInvited: true,
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
id: 'userActivity',
|
id: 'userActivity',
|
||||||
@@ -576,7 +577,7 @@ describe('webhooks', () => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
['questStarted', 'questFinised'].forEach(type => {
|
['questStarted', 'questFinised', 'questInvited'].forEach(type => {
|
||||||
it(`sends ${type} webhooks`, () => {
|
it(`sends ${type} webhooks`, () => {
|
||||||
data.type = type;
|
data.type = type;
|
||||||
|
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ describe('Webhook Model', () => {
|
|||||||
options: {
|
options: {
|
||||||
questStarted: true,
|
questStarted: true,
|
||||||
questFinished: true,
|
questFinished: true,
|
||||||
|
questInvited: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -197,6 +198,7 @@ describe('Webhook Model', () => {
|
|||||||
expect(wh.options).to.eql({
|
expect(wh.options).to.eql({
|
||||||
questStarted: false,
|
questStarted: false,
|
||||||
questFinished: false,
|
questFinished: false,
|
||||||
|
questInvited: false,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -210,6 +212,7 @@ describe('Webhook Model', () => {
|
|||||||
expect(wh.options).to.eql({
|
expect(wh.options).to.eql({
|
||||||
questStarted: false,
|
questStarted: false,
|
||||||
questFinished: true,
|
questFinished: true,
|
||||||
|
questInvited: true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -224,6 +227,7 @@ describe('Webhook Model', () => {
|
|||||||
expect(wh.options).to.eql({
|
expect(wh.options).to.eql({
|
||||||
questStarted: true,
|
questStarted: true,
|
||||||
questFinished: true,
|
questFinished: true,
|
||||||
|
questInvited: true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ const USER_ACTIVITY_DEFAULT_OPTIONS = Object.freeze({
|
|||||||
const QUEST_ACTIVITY_DEFAULT_OPTIONS = Object.freeze({
|
const QUEST_ACTIVITY_DEFAULT_OPTIONS = Object.freeze({
|
||||||
questStarted: false,
|
questStarted: false,
|
||||||
questFinished: false,
|
questFinished: false,
|
||||||
|
questInvited: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const schema = new Schema({
|
export const schema = new Schema({
|
||||||
|
|||||||
Reference in New Issue
Block a user