Writing unit testing using shield plugin filament for role and permissions
How i can create a unit test for application has a filament plugin shield ?
7 Replies
what part would you like to test?
I have seen your discution , i find the solution, but i have another problem, my default guard is 'api' how i can update the guard 'web' for testing filament, and guard'api' for testing the 'api/' ? how i can switch between them ?
Disable shields for testing - Filament
Hey,
I'm using the filament-shield package.
How do you disable all the shields for testing? In my testcase I do
But I still get a 403. I guess it's because of shields
Solution
I think
actingAs
supports guard in the second param..aah good, thi's my solution, thank you.
It works,
you can also do this here
Yes, i'm reading it.