Skip to content

Commit d65e570

Browse files
committed
Fix gateway route static test
1 parent 5b0955d commit d65e570

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

server/tests/FeatureTest.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,24 @@
282282
$detailsComponentJs = file_get_contents(__DIR__ . '/../../addon/components/gateway/details.js');
283283
$detailsController = file_get_contents(__DIR__ . '/../../addon/controllers/payments/gateways/details.js');
284284
$styles = file_get_contents(__DIR__ . '/../../addon/styles/ledger-engine.css');
285+
$gatewayRoutes = "this.route('gateways', function () {
286+
this.route('index', { path: '/' });
287+
this.route('new');
288+
this.route('edit', { path: '/edit/:id' });
289+
this.route('details', { path: '/:id' }, function () {
290+
this.route('index', { path: '/' });
291+
this.route('setup');
292+
this.route('diagnostics');
293+
this.route('webhooks');
294+
});
295+
});";
285296

286297
expect($routes)
287-
->toContain("this.route('index', { path: '/' });")
288-
->toContain("this.route('new');")
289-
->toContain("this.route('edit', { path: '/edit/:id' });")
290-
->toContain("this.route('details', { path: '/:id' }, function ()")
291-
->toContain("this.route('setup')")
292-
->toContain("this.route('diagnostics')")
293-
->not->toContain("this.route('index', { path: '/' }, function () {\n this.route('new');\n this.route('edit', { path: '/:id/edit' });");
298+
->toContain($gatewayRoutes)
299+
->not->toContain("this.route('gateways', function () {
300+
this.route('index', { path: '/' }, function () {
301+
this.route('new');
302+
this.route('edit', { path: '/:id/edit' });");
294303

295304
expect($indexController)
296305
->toContain("this.fetch.get('gateways/summary'")

0 commit comments

Comments
 (0)