Skip to content

Commit 3ae2ccc

Browse files
committed
Added better test coverage
1 parent 4a1712b commit 3ae2ccc

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

tests/Feature/HealthySqlDumpTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Makeable\SqlCheck\Tests\Feature;
44

5+
use Illuminate\Support\Facades\Artisan;
56
use Illuminate\Support\Facades\Event;
67
use Makeable\SqlCheck\HealthySqlDump;
78
use Makeable\SqlCheck\Tests\TestCase;
@@ -25,7 +26,7 @@ public function setUp(): void
2526
}
2627

2728
/** @test */
28-
public function it_fails_when_backup_is_corrupt()
29+
public function it_succeeds_when_file_is_healthy()
2930
{
3031
config()->set('backup.monitor_backups.0.name', 'mysite');
3132

@@ -40,16 +41,15 @@ public function it_fails_when_backup_is_corrupt()
4041
}
4142

4243
// Needs better backup option
43-
// /** @test */
44-
// public function it_fails_when_backup_is_corrupt()
45-
// {
46-
// config()->set('backup.monitor_backups.0.name', 'unhealthy');
47-
//
48-
//
49-
// Event::fake();
50-
//
51-
// $this->artisan('backup:monitor')->assertExitCode(0);
52-
//
53-
// Event::assertDispatched(HealthyBackupWasFound::class);
54-
// }
44+
/** @test */
45+
public function it_fails_when_backup_is_corrupt()
46+
{
47+
config()->set('backup.monitor_backups.0.name', 'unhealthy');
48+
49+
Event::fake();
50+
51+
$this->artisan('backup:monitor')->assertExitCode(0);
52+
53+
Event::assertDispatched(UnhealthyBackupWasFound::class);
54+
}
5555
}
-1.85 KB
Binary file not shown.
1.11 KB
Binary file not shown.
1.31 KB
Binary file not shown.

0 commit comments

Comments
 (0)