Sergiu17 liked a comment+100 XP
1mo ago
@sandraalmassri OK? Do that, then?
Sergiu17 wrote a reply+100 XP
1mo ago
I don't think you want to test the middleware itself, you need to make sure some specific routes has that middleware.
collect(Route::getRoutes())
->filter(fn ($route) => str_contains($route->uri(), 'api'))
->each(fn($route) => $this->assertContains('throttle:60,1', $route->gatherMiddleware()));
modify the filter according to your needs
Sergiu17 wrote a reply+100 XP
2mos ago
Sergiu17 wrote a reply+100 XP
2mos ago
Hello, check Laravel Cloud https://cloud.laravel.com/
Sergiu17 wrote a reply+100 XP
2mos ago
Try to add a pause just to see if it's because of the logic on the server
visit(route('referrals.create'))
->type('#company', $company->name)
->pause(1000) // <---------- this
->select('#type_id', '1')
->radio('[name="code_or_url_radio"]', 'code')
->fill('#code_or_url', '122234')
->fill('#referrals_commission', '10')
->press('#save')
Sergiu17 liked a comment+100 XP
4mos ago