Skip to content

Commit 2a743d5

Browse files
authored
Update tests to follow Inertia convention (#721)
1 parent 2c6623d commit 2a743d5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/Feature/Lexers/StatementLexerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ public function it_returns_a_render_statement_with_data(): void
7878
public function it_returns_an_inertia_statement_with_data(): void
7979
{
8080
$tokens = [
81-
'inertia' => 'post.index with:foo,bar,baz',
81+
'inertia' => 'Post/Index with:foo,bar,baz',
8282
];
8383

8484
$actual = $this->subject->analyze($tokens);
8585

8686
$this->assertCount(1, $actual);
8787
$this->assertInstanceOf(InertiaStatement::class, $actual[0]);
8888

89-
$this->assertEquals('post.index', $actual[0]->view());
89+
$this->assertEquals('Post/Index', $actual[0]->view());
9090
$this->assertEquals(['foo', 'bar', 'baz'], $actual[0]->data());
9191
}
9292

tests/fixtures/controllers/inertia-render.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function show(Request $request, Customer $customer): Response
1313
{
1414
$customers = Customer::all();
1515

16-
return Inertia::render('customer.show', [
16+
return Inertia::render('Customer/Show', [
1717
'customer' => $customer,
1818
'customers' => $customers,
1919
]);

tests/fixtures/drafts/inertia-render.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ controllers:
22
Customer:
33
show:
44
query: all
5-
inertia: customer.show with:customer,customers
5+
inertia: Customer/Show with:customer,customers

0 commit comments

Comments
 (0)