Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Jan 30, 2021
1 parent 5d8a161 commit 00f8df9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Console/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function handle(): int
{
$status = $this->call('migrate');

if ($this->option('seed') && $this->laravel->environment('local')) {
if ($this->option('seed') && $this->laravel->environment(['local', 'testing'])) {
$status = $this->call('db:seed', ['--class' => BazarSeeder::class]);
}

Expand Down
3 changes: 3 additions & 0 deletions tests/Feature/CommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Illuminate\Console\Command;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Queue;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;

Expand Down Expand Up @@ -39,6 +40,8 @@ public function it_can_clear_chunks()
/** @test */
public function it_can_install_bazar()
{
Queue::fake();

$this->artisan('bazar:install')
->assertExitCode(Command::SUCCESS);

Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public function setUp(): void
$this->registerPolicies();

$this->app['config']->set('auth.providers.users.model', User::class);
$this->app['config']->set('bazar.admins', ['admin@bazar.test']);
$this->app['config']->set('bazar.admins', ['test@bazar.test']);

Storage::fake('local');
Storage::fake('public');

$this->admin = UserFactory::new()->create(['email' => 'admin@bazar.test']);
$this->admin = UserFactory::new()->create(['email' => 'test@bazar.test']);
$this->user = UserFactory::new()->create();
}

Expand Down

0 comments on commit 00f8df9

Please sign in to comment.