We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31e9d9d commit da93736Copy full SHA for da93736
1 file changed
tests/Auth/ElevatedSessionTest.php
@@ -680,6 +680,19 @@ public function frontend_can_confirm_elevated_session_via_json()
680
->assertSessionHas('statamic_elevated_session', now()->timestamp);
681
}
682
683
+ #[Test]
684
+ public function frontend_can_confirm_elevated_session_via_inertia()
685
+ {
686
+ redirect()->setIntendedUrl('/target-url');
687
+
688
+ $this
689
+ ->actingAs($this->user)
690
+ ->post('/!/auth/elevated-session', ['password' => 'secret'], ['X-Inertia' => 'true'])
691
+ ->assertStatus(409)
692
+ ->assertHeader('X-Inertia-Location', 'http://localhost/target-url')
693
+ ->assertSessionHas('statamic_elevated_session', now()->timestamp);
694
+ }
695
696
#[Test]
697
public function frontend_cannot_confirm_elevated_session_with_incorrect_password()
698
{
0 commit comments