First step in improving test coverage.

This commit is contained in:
James Cole
2018-08-30 20:58:07 +02:00
parent e158b9b64e
commit 33fe6dbfa3
19 changed files with 517 additions and 29 deletions

View File

@@ -48,10 +48,13 @@ class CallbackController extends Controller
{
$code = (string)$request->get('code');
$jobKey = (string)$request->get('state');
$importJob = $repository->findByKey($jobKey);
if ('' === $code) {
return view('error')->with('message', 'You Need A Budget did not reply with a valid authorization code. Firefly III cannot continue.');
}
$importJob = $repository->findByKey($jobKey);
if ('' === $jobKey || null === $importJob) {
return view('error')->with('message', 'You Need A Budget did not reply with the correct state identifier. Firefly III cannot continue.');
}