conedevelopment / bazar

Bazar is an e-commerce package for Laravel applications.
https://root.conedevelopment.com
MIT License
427 stars 57 forks source link

UserFactory uses Bazar\Model\Users #150

Closed ven7ura closed 3 years ago

ven7ura commented 3 years ago

Description:

When doing tests, any custom methods on the Users model (in my case fresh installation for Laravel Jetstream) does not register. I know the recommended auth scaffolding is Laravel Breeze, just testing Jetstream with Bazar.

Steps To Reproduce:

Fresh install of Laravel Install Laravel Jetstream Run tests BadMethodCallException: Call to undefined method Bazar\Models\User::deleteProfilePhoto()

You can fix this by changing Bazar\Database\Factories\UserFactory

From use Bazar\Models\User; To use App\Models\User;

iamgergo commented 3 years ago

Hi,

Yes, you are right. I added a dynamic check, it should be fine, but for the long term, we might find out a better solution.

Please upgrade to v0.7.5.

Thanks!