Complete phpunit tests

This commit is contained in:
Bubka 2020-10-12 15:44:11 +02:00
parent 4303af509f
commit b566c233e6
2 changed files with 18 additions and 2 deletions

View File

@ -21,11 +21,12 @@ class Kernel extends ConsoleKernel
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*
* @codeCoverageIgnore Because no code will always remains Not Executed code
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
//
}
/**

View File

@ -4,6 +4,7 @@
use App\User;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Password;
use Illuminate\Auth\Notifications\ResetPassword;
use Illuminate\Support\Facades\Notification;
@ -85,4 +86,18 @@ public function testSubmitEmailPasswordRequest()
});
}
/**
* Testing submitting the email password request in Demo mode
*/
public function testSubmitEmailPasswordRequestInDemoMode()
{
Config::set('app.options.isDemoApp', true);
$response = $this->json('POST', '/api/password/email', [
'email' => ''
]);
$response->assertStatus(401);
}
}