everything is in documentation about CSRF maybe you forget X-CSRF-TOKEN https://laravel.com/docs/5.4/csrf
Feb 8, 2017
3
Level 1
Dusk: CSRF mismatch error
Hey,
Just working through some more Dusk tests and I'm hitting the 'TokenMismatchException' error when a form is submitted.
The overall blade template includes the CSRF meta tag and I'm even specifying to not use Middleware within the test within the class as follows:
use Tests\DuskTestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class SubmitEntryTest extends DuskTestCase
{
use WithoutMiddleware, DatabaseMigrations;
...
}
Anyone else having this issue or am I missing something simple?
Thanks
Please or to participate in this conversation.