Skip to content

Commit

Permalink
Add ViewComponentColumn label test (#2075)
Browse files Browse the repository at this point in the history
  • Loading branch information
lrljoe authored Nov 20, 2024
1 parent 59a7967 commit adbf41a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/Unit/Views/Columns/ViewComponentColumnTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,11 @@ public function test_can_use_custom_component(): void
$this->assertSame('<div>2420</div>', $contents);
}*/

public function test_can_not_user_as_label(): void
{
$this->expectException(DataTableConfigurationException::class);

$column = ViewComponentColumn::make('Total Users')->label(fn () => 'My Label')->getContents(Pet::find(1));
}
}

0 comments on commit adbf41a

Please sign in to comment.