Skip to content

Commit 98833cd

Browse files
committed
Tweak middleware tests
1 parent 3fa8a0d commit 98833cd

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

tests/MiddlewareTest.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ public function test_the_version_can_be_a_number()
1515

1616
$request = Request::create('/user/123', 'GET');
1717
$request->headers->add(['X-Inertia' => 'true']);
18-
$request->headers->add(['X-Inertia-Version' => 1597347897973]);
18+
$request->headers->add(['X-Inertia-Version' => '1597347897973']);
1919

2020
$response = $this->makeMockResponse($request);
2121

2222
$response->assertSuccessful();
23-
$response->assertJson([
24-
'component' => 'User/Edit',
25-
]);
23+
$response->assertJson(['component' => 'User/Edit']);
2624
}
2725

2826
public function test_the_version_can_be_a_string()
@@ -36,9 +34,7 @@ public function test_the_version_can_be_a_string()
3634
$response = $this->makeMockResponse($request);
3735

3836
$response->assertSuccessful();
39-
$response->assertJson([
40-
'component' => 'User/Edit',
41-
]);
37+
$response->assertJson(['component' => 'User/Edit']);
4238
}
4339

4440
public function test_the_version_can_be_a_closure()
@@ -54,9 +50,7 @@ public function test_the_version_can_be_a_closure()
5450
$response = $this->makeMockResponse($request);
5551

5652
$response->assertSuccessful();
57-
$response->assertJson([
58-
'component' => 'User/Edit',
59-
]);
53+
$response->assertJson(['component' => 'User/Edit']);
6054
}
6155

6256
public function test_it_will_instruct_inertia_to_reload_on_a_version_mismatch()

0 commit comments

Comments
 (0)