|
@@ -2,7 +2,6 @@
|
|
|
|
|
|
namespace Tests\Feature\Console;
|
|
|
|
|
|
-use App\Models\User;
|
|
|
use Tests\FeatureTestCase;
|
|
|
use Illuminate\Support\Facades\Config;
|
|
|
|
|
@@ -16,7 +15,7 @@ class ResetDemoTest extends FeatureTestCase
|
|
|
{
|
|
|
$this->artisan('2fauth:reset-demo')
|
|
|
->expectsOutput('2fauth:reset-demo can only run when isDemoApp option is On')
|
|
|
- ->assertExitCode(0);
|
|
|
+ ->assertSuccessful();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -29,8 +28,7 @@ class ResetDemoTest extends FeatureTestCase
|
|
|
$this->artisan('2fauth:reset-demo')
|
|
|
->expectsOutput('This will reset the app in order to run a clean and fresh demo.')
|
|
|
->expectsQuestion('To prevent any mistake please type the word "demo" to go on', 'demo')
|
|
|
- ->expectsOutput('Demo app refreshed')
|
|
|
- ->assertExitCode(0);
|
|
|
+ ->assertSuccessful();
|
|
|
|
|
|
$this->assertDatabaseCount('twofaccounts', 9);
|
|
|
|
|
@@ -147,7 +145,7 @@ class ResetDemoTest extends FeatureTestCase
|
|
|
$this->artisan('2fauth:reset-demo')
|
|
|
->expectsQuestion('To prevent any mistake please type the word "demo" to go on', 'null')
|
|
|
->expectsOutput('Bad confirmation word, nothing appened')
|
|
|
- ->assertExitCode(0);
|
|
|
+ ->assertSuccessful();
|
|
|
}
|
|
|
|
|
|
|
|
@@ -158,9 +156,10 @@ class ResetDemoTest extends FeatureTestCase
|
|
|
{
|
|
|
Config::set('2fauth.config.isDemoApp', true);
|
|
|
|
|
|
- $this->artisan('2fauth:reset-demo --no-confirm')
|
|
|
- ->expectsOutput('Demo app refreshed')
|
|
|
- ->assertExitCode(0);
|
|
|
+ $this->artisan('2fauth:reset-demo', [
|
|
|
+ '--no-confirm' => true
|
|
|
+ ])
|
|
|
+ ->assertSuccessful();
|
|
|
}
|
|
|
|
|
|
}
|