|
282 | 282 | $detailsComponentJs = file_get_contents(__DIR__ . '/../../addon/components/gateway/details.js'); |
283 | 283 | $detailsController = file_get_contents(__DIR__ . '/../../addon/controllers/payments/gateways/details.js'); |
284 | 284 | $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 | + });"; |
285 | 296 |
|
286 | 297 | 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' });"); |
294 | 303 |
|
295 | 304 | expect($indexController) |
296 | 305 | ->toContain("this.fetch.get('gateways/summary'") |
|
0 commit comments