-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs acf0baa Due to the bump in express-test, we now handle string bodies 'properly'. So they now pass all the Express middlewares. In the past this failing test did not really pass by the bodyParser.raw middleware, so the content-type check on the `bodyParser.raw({type: 'application/json'})` middleware was not executed. Now it is, and the test fails because the content-type header was not set to application/json.
- Loading branch information
1 parent
acf0baa
commit 6c2af07
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,6 +176,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature) | ||
.expectStatus(200); | ||
}); | ||
|
@@ -307,6 +308,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature) | ||
.expectStatus(200); | ||
|
||
|
@@ -516,6 +518,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature) | ||
.expectStatus(200); | ||
|
||
|
@@ -649,6 +652,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature); | ||
|
||
const {body} = await adminAgent.get('/members/[email protected]'); | ||
|
@@ -747,6 +751,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature); | ||
|
||
const {body} = await adminAgent.get('/members/[email protected]'); | ||
|
@@ -795,6 +800,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature); | ||
|
||
const {body} = await adminAgent.get('/members/[email protected]'); | ||
|
@@ -865,6 +871,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature) | ||
.expectStatus(200); | ||
}); | ||
|
@@ -993,6 +1000,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature) | ||
.expectStatus(200); | ||
|
||
|
@@ -1054,6 +1062,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature) | ||
.expectStatus(200); | ||
|
||
|
@@ -1390,6 +1399,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature); | ||
|
||
const {body} = await adminAgent.get(`/members/?search=${customer_id}@email.com`); | ||
|
@@ -1448,6 +1458,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature) | ||
.expectStatus(200); | ||
|
||
|
@@ -1586,6 +1597,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature); | ||
|
||
const {body} = await adminAgent.get(`/members/?search=${customer_id}@email.com`); | ||
|
@@ -1749,6 +1761,7 @@ describe('Members API', function () { | |
|
||
await membersAgent.post('/webhooks/stripe/') | ||
.body(webhookPayload) | ||
.header('content-type', 'application/json') | ||
.header('stripe-signature', webhookSignature) | ||
.expectStatus(200); | ||
|
||
|