Skip to content

sendGET changed requested directory #2987

Closed

Description

@codeachange
        $I->sendGET('employee/ajax-search-employee.html?company_id=mycompany');
        $I->seeResponseIsJson();
        $I->seeResponseContainsJson(['status'=>true]);
        $employees = json_decode($I->grabResponse(), true);
        $employee = $employees['data'][0];

        $I->sendGET('employee/ajax-get-employee-detail.html?employee_id='.$employee['employee_id']);
        $I->seeResponseIsJson();
        $I->seeResponseContainsJson(['status'=>true]);
        $employee = json_decode($I->grabResponse(), true);

the second sendGET actually send a request to "/employee/employee/ajax-get-employee-detail.html?employee_id=4a315d4e016d11e6b43a4ca24a88ce71", is this expected?

Activity

  1. codeachange commented on Apr 14, 2016

    @codeachange
    Author

    If I add a slash, and change the second sendGET to $I->sendGET('/employee/ajax-get-employee-detail.html?employee_id='.$employee['employee_id']);, it will work as expected.

  2. Naktibalda commented on Jan 10, 2021

    @Naktibalda
    Member

    The obvious solution of using leading slash in URL was mentioned in description, so I am closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions