-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ad6521
commit edd4555
Showing
4 changed files
with
94 additions
and
81 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
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
45 changes: 45 additions & 0 deletions
45
test/integrations/destinations/facebook_pixel/dataDelivery/oauth.ts
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { testFormData, statTags } from './business'; | ||
import { generateProxyV1Payload, generateMetadata } from '../../../testUtils'; | ||
import { ProxyV1TestData } from '../../../testTypes'; | ||
import { VERSION } from '../../../../../src/v0/destinations/facebook_pixel/config'; | ||
|
||
export const oauthScenariosV1: ProxyV1TestData[] = [ | ||
{ | ||
id: 'facebook_pixel_v1_oauth_scenario_1', | ||
name: 'facebook_pixel', | ||
description: 'app event fails due to missing permissions', | ||
successCriteria: 'Should return 400 with missing permissions error', | ||
scenario: 'Business', | ||
feature: 'dataDelivery', | ||
module: 'destination', | ||
version: 'v1', | ||
input: { | ||
request: { | ||
body: generateProxyV1Payload({ | ||
endpoint: `https://graph.facebook.com/${VERSION}/1234567891234571/events?access_token=valid_access_token`, | ||
FORM: testFormData, | ||
}), | ||
method: 'POST', | ||
}, | ||
}, | ||
output: { | ||
response: { | ||
status: 200, | ||
body: { | ||
output: { | ||
status: 400, | ||
message: 'Capability or permissions issue.', | ||
statTags, | ||
response: [ | ||
{ | ||
error: 'Capability or permissions issue.', | ||
statusCode: 400, | ||
metadata: generateMetadata(1), | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
]; |
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