Super late reply here, but putting this here in case someone needs it later:
The second test is not using the Http header "Accept" with value "application/json"
The first test is using postJson and getJson which adds this header automatically. Therefore you are not receiving json for your get, and seem to be redirected to a login-form.
Assuming this is Laravel + Passport & phpUnit heh.