Fix assertions

This commit is contained in:
M. D
2024-04-05 22:36:25 +02:00
committed by GitHub
parent cb023bf0f7
commit 3d55dc682f
+3 -3
View File
@@ -241,7 +241,7 @@ it('displays author in red', function () {
### Select Columns
If you have a select column, you can ensure it has the correct options with `assertSelectColumnHasOptions()` and `assertSelectColumnDoesNotHaveOptions()`:
If you have a select column, you can ensure it has the correct options with `assertTableSelectColumnHasOptions()` and `assertTableSelectColumnDoesNotHaveOptions()`:
```php
use function Pest\Livewire\livewire;
@@ -250,8 +250,8 @@ it('has the correct statuses', function () {
$post = Post::factory()->create();
livewire(PostsTable::class)
->assertSelectColumnHasOptions('status', ['unpublished' => 'Unpublished', 'published' => 'Published'], $post)
->assertSelectColumnDoesNotHaveOptions('status', ['archived' => 'Archived'], $post);
->assertTableSelectColumnHasOptions('status', ['unpublished' => 'Unpublished', 'published' => 'Published'], $post)
->assertTableSelectColumnDoesNotHaveOptions('status', ['archived' => 'Archived'], $post);
});
```