mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-19 17:52:45 +02:00
* fix: use correct URL for update feature strategy * fix: use correct URL for create feature strategy
21 lines
724 B
TypeScript
21 lines
724 B
TypeScript
import { formatAddStrategyApiCode } from 'component/feature/FeatureStrategy/FeatureStrategyCreate/FeatureStrategyCreate';
|
|
|
|
test('formatAddStrategyApiCode', () => {
|
|
expect(
|
|
formatAddStrategyApiCode(
|
|
'projectId',
|
|
'featureId',
|
|
'environmentId',
|
|
{ id: 'strategyId' },
|
|
'unleashUrl'
|
|
)
|
|
).toMatchInlineSnapshot(`
|
|
"curl --location --request POST 'unleashUrl/api/admin/projects/projectId/features/featureId/environments/environmentId/strategies' \\\\
|
|
--header 'Authorization: INSERT_API_KEY' \\\\
|
|
--header 'Content-Type: application/json' \\\\
|
|
--data-raw '{
|
|
\\"id\\": \\"strategyId\\"
|
|
}'"
|
|
`);
|
|
});
|