mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-25 10:18:31 +02:00
Fix curl import when using boolean flags
This commit is contained in:
@@ -196,6 +196,27 @@ describe('importer-curl', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('Imports post data into URL', () => {
|
||||
expect(
|
||||
pluginHookImport(ctx, 'curl -G https://api.stripe.com/v1/payment_links -d limit=3'),
|
||||
).toEqual({
|
||||
resources: {
|
||||
workspaces: [baseWorkspace()],
|
||||
httpRequests: [
|
||||
baseRequest({
|
||||
method: 'GET',
|
||||
url: 'https://api.stripe.com/v1/payment_links',
|
||||
urlParameters: [{
|
||||
enabled: true,
|
||||
name: 'limit',
|
||||
value: '3',
|
||||
}]
|
||||
}),
|
||||
],
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
test('Imports multi-line JSON', () => {
|
||||
expect(
|
||||
pluginHookImport(
|
||||
|
||||
Reference in New Issue
Block a user