livewire / volt

Volt is an elegantly crafted functional API for Livewire.
https://livewire.laravel.com/docs/volt
MIT License
312 stars 19 forks source link

Livewire Volt::actingAs() method #60

Closed nmfirdausw closed 9 months ago

nmfirdausw commented 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();
driesvints commented 9 months ago

Feel free to attempt a PR 👍

nunomaduro commented 9 months ago

This is fixed. Ships next week.

nmfirdausw commented 9 months ago

Thanks @nunomaduro