Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: request validation test fix #1141

Merged
merged 1 commit into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ test:
yarn test:files
yarn test:license
yarn test:typescript
yarn test:eventwebhook

test-integ: test
yarn test:mail
Expand Down
12 changes: 6 additions & 6 deletions packages/eventwebhook/src/eventwebhook.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ describe('EventWebhook', () => {
const SIGNATURE = 'MEUCIQCtIHJeH93Y+qpYeWrySphQgpNGNr/U+UyUlBkU6n7RAwIgJTz2C+8a8xonZGi6BpSzoQsbVRamr2nlxFDWYNH2j/0=';
const TIMESTAMP = '1588788367';
const PAYLOAD = {
event: 'test_event',
category: 'example_payload',
event: 'test_event',
message_id: 'message_id',
};

Expand All @@ -17,7 +17,7 @@ describe('EventWebhook', () => {
PAYLOAD,
SIGNATURE,
TIMESTAMP
)).to.be.true;
)).to.equal(true);
});

it('should reject for invalid key', () => {
Expand All @@ -26,7 +26,7 @@ describe('EventWebhook', () => {
PAYLOAD,
SIGNATURE,
TIMESTAMP
)).to.be.false;
)).to.equal(false);
});

it('should reject for bad payload', () => {
Expand All @@ -35,7 +35,7 @@ describe('EventWebhook', () => {
'payload',
SIGNATURE,
TIMESTAMP
)).to.be.false;
)).to.equal(false);
});

it('should reject for bad signature', () => {
Expand All @@ -44,7 +44,7 @@ describe('EventWebhook', () => {
PAYLOAD,
'MEUCIQCtIHJeH93Y+qpYeWrySphQgpNGNr/U+UyUlBkU6n7RAwIgJTz2C+8a8xonZGi6BpSzoQsbVRamr2nlxFDWYNH3j/0=',
TIMESTAMP
)).to.be.false;
)).to.equal(false);
});

it('should reject for bad timestamp', () => {
Expand All @@ -53,7 +53,7 @@ describe('EventWebhook', () => {
PAYLOAD,
SIGNATURE,
'timestamp'
)).to.be.false;
)).to.equal(false);
});
});
});
Expand Down