changed avatar url in both old and new EDIT APIs| removed db raw from road items report| changed url in Randd

This commit is contained in:
2024-10-01 13:12:12 +00:00
parent bc4ae8d3a8
commit 7678ed9298
8 changed files with 17 additions and 14 deletions

View File

@@ -208,10 +208,7 @@ class EditTest extends TestCase
$avatar = UploadedFile::fake()->create('image.jpg', 1024);
FileFacade::shouldReceive('save')
->andReturn('image.jpg');
FileFacade::shouldReceive('delete');
Storage::fake();
$data = [
'first_name' => $this->faker->firstName,

View File

@@ -5,6 +5,7 @@ namespace Tests\Feature\V3\Profile;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\Storage;
use Tests\TestCase;
@@ -33,7 +34,7 @@ class InfoTest extends TestCase
'degree' => $user->degree,
'mobile' => $user->mobile,
# an accessor has been defined in User model for User's avatar
'avatar' => Storage::disk('public')->url($user->avatar),
'avatar' => URL::to('/') . '/' . $user->avatar,
]
]);
}