Skip to content

Commit

Permalink
fix: CollectionRuleFactory import on model
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Dec 5, 2024
1 parent 35f3aed commit ee08820
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion packages/core/database/factories/CollectionRuleFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ class CollectionRuleFactory extends Factory
*/
public function definition(): array
{
return [];
return [
'rule' => $this->faker->word(),
'operator' => $this->faker->word(),
'value' => $this->faker->word(),
];
}
}
2 changes: 1 addition & 1 deletion packages/core/src/Models/CollectionRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
namespace Shopper\Core\Models;

use Carbon\Carbon;
use Database\Factories\CollectionRuleFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Shopper\Core\Database\Factories\CollectionRuleFactory;
use Shopper\Core\Enum\Operator;
use Shopper\Core\Enum\Rule;

Expand Down
3 changes: 2 additions & 1 deletion tests/src/Admin/Features/BrandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Shopper\Core\Models\Brand;
use Shopper\Core\Repositories\BrandRepository;
use Shopper\Livewire\Pages\Brand\Index;
use Shopper\Livewire\SlideOvers\BrandForm;
use Shopper\Tests\Admin\Features\TestCase;

Expand All @@ -15,7 +16,7 @@
it('can render brand page', function (): void {
$this->get($this->prefix . '/brands');

livewire(\Shopper\Livewire\Pages\Brand\Index::class)
livewire(Index::class)
->assertSee(__('shopper::pages/brands.menu'));
});

Expand Down

0 comments on commit ee08820

Please sign in to comment.