Closed nmfirdausw closed 9 months ago
I was writing test using PEST2, Since I was using Volt and need to write test for function that have auth()->user(), It was return null since no actingAs method to use in Volt Class.
Hope It would be better if Volt also have this function below.
Livewire::actingAs($user) ->test(UpdatePost::class, ['post' => $post]) ->set('title', 'Living the lavender life') ->call('save') ->assertUnauthorized();
Feel free to attempt a PR 👍
This is fixed. Ships next week.
Thanks @nunomaduro
I was writing test using PEST2, Since I was using Volt and need to write test for function that have auth()->user(), It was return null since no actingAs method to use in Volt Class.
Hope It would be better if Volt also have this function below.