Skip to content

Commit

Permalink
Add route extender test
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Jul 3, 2021
1 parent d559ee3 commit e6ef3ba
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/steps/generate/extenders.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getFsPaths, runStep } from '../../utils';

import { GenerateApiSerializerAttributesExtender } from '../../../src/steps/extenders/api-serializer';
import { GenerateEventListenerExtender } from '../../../src/steps/extenders/event';
import { GenerateRouteExtender } from '../../../src/steps/extenders/route';
import { PathProvider } from '../../../src/provider/path-provider';

interface ExtenderTest {
Expand Down Expand Up @@ -29,6 +30,15 @@ const testSpecs: ExtenderTest[] = [
modelClass: 'Flarum\\User\\User',
},
},
// Route
{
extenderClass: GenerateRouteExtender,
params: {
routePath: '/potatoes',
routeName: 'potatoes.index',
routeHandler: 'Flarum\\Demo\\Api\\Controller\\ListPotatoesController',
},
},
];

describe('Extender tests', function () {
Expand Down

0 comments on commit e6ef3ba

Please sign in to comment.