Livewire in Tests

What seems to be the problem:
I’m trying to create a test to ensure only users with the correct permission can create a model via the Livewire class. The Create test works great if the user has the correct permission, however I also want a test verifying it won’t create with incorrect permissions. I run this test, and simply receive Undefined index: fingerprint.

Are you using the latest version of Livewire:

public function mount()

    $this->authorize('create property');


Hey, @bdbolin
Can you share your full code?

Or maybe you want to see this

Hey @skywalker - I figured it out after looking at this:

I was still trying to set the values before my ->assertForbidden();
That leads to the “Undefined index: fingerprint” error. So the fix was removing my set and my call on the Livewire component:

->set(‘name’, 'Chewy)
->set(‘status’, ‘active’)
->set(‘address’, ‘address’)

Would you mind explaining why it wouldn’t work? Or where that error comes from? Thanks!