Skip to content

Commit bc897f8

Browse files
committed
add clear history property
1 parent d783ca2 commit bc897f8

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/Response.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public function toResponse($request)
9696
'url' => Str::start(Str::after($request->fullUrl(), $request->getSchemeAndHttpHost()), '/'),
9797
'version' => $this->version,
9898
'encryptHistory' => false,
99+
'clearHistory' => false,
99100
];
100101

101102
if ($request->header(Header::INERTIA)) {

tests/ControllerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public function test_controller_returns_an_inertia_response(): void
2929
'url' => '/',
3030
'version' => '',
3131
'encryptHistory' => false,
32+
'clearHistory' => false,
3233
]);
3334
}
3435
}

tests/ResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function test_server_response(): void
4646
$this->assertSame('Jonathan', $page['props']['user']['name']);
4747
$this->assertSame('/user/123', $page['url']);
4848
$this->assertSame('123', $page['version']);
49-
$this->assertSame('<div id="app" data-page="{&quot;component&quot;:&quot;User\/Edit&quot;,&quot;props&quot;:{&quot;user&quot;:{&quot;name&quot;:&quot;Jonathan&quot;}},&quot;url&quot;:&quot;\/user\/123&quot;,&quot;version&quot;:&quot;123&quot;,&quot;encryptHistory&quot;:false}"></div>', $view->render());
49+
$this->assertSame('<div id="app" data-page="{&quot;component&quot;:&quot;User\/Edit&quot;,&quot;props&quot;:{&quot;user&quot;:{&quot;name&quot;:&quot;Jonathan&quot;}},&quot;url&quot;:&quot;\/user\/123&quot;,&quot;version&quot;:&quot;123&quot;,&quot;encryptHistory&quot;:false,&quot;clearHistory&quot;:false}"></div>', $view->render());
5050
}
5151

5252
public function test_xhr_response(): void

0 commit comments

Comments
 (0)