Thank you for the response. You were right for one part. I believe the string manipulation made is issue there. Yet, the issue still exists. I got 401 now.
There was 1 failure:
1) Tests\Feature\UserTest::a_user_can_get_details
Response status code [401] is not a successful status code.
Failed asserting that false is true.
/Users/santhoshj/dev/Sites/diet-server/vendor/laravel/framework/src/Illuminate/Testing/TestResponse.php:73
/Users/santhoshj/dev/Sites/diet-server/tests/Feature/UserTest.php:140
Thank you for the response. You were right for one part. I believe the string manipulation made is issue there. Yet, the issue still exists. I got 401 now.
I changed my header array like this:
I tried die and dump the $response, and here is the header array from the dd: