mirror of
https://github.com/grokability/snipe-it.git
synced 2026-03-12 17:52:00 +08:00
fix variables
This commit is contained in:
@@ -1484,8 +1484,8 @@ class Helper
|
||||
static public function getRedirectOption($request, $id, $table, $item_id = null) : RedirectResponse
|
||||
{
|
||||
|
||||
$redirect_option = Session::get('redirect_option') ?? $request->input('redirect_option');
|
||||
$checkout_to_type = Session::get('checkout_to_type') ?? $request->input('checkout_to_type');
|
||||
$redirect_option = Session::get('redirect_option') ?? $request->redirect_option;
|
||||
$checkout_to_type = Session::get('checkout_to_type') ?? null;
|
||||
$checkedInFrom = Session::get('checkedInFrom');
|
||||
$other_redirect = Session::get('other_redirect');
|
||||
$backUrl = Session::pull('back_url', route('home'));
|
||||
|
||||
@@ -167,7 +167,8 @@ class HelperTest extends TestCase
|
||||
Session::put('redirect_option', $data['redirect_option']);
|
||||
Session::put('checkout_to_type', $data['checkout_to_type']);
|
||||
|
||||
$redirect = redirect()->to(Helper::getRedirectOption($data['request'],$data['id'], $data['table']));
|
||||
$redirect = Helper::getRedirectOption($data['request'], $data['id'], $data['table']);
|
||||
|
||||
|
||||
$this->assertInstanceOf(RedirectResponse::class, $redirect);
|
||||
$this->assertEquals($data['route'], $redirect->getTargetUrl(), $scenario.'failed.');
|
||||
|
||||
Reference in New Issue
Block a user