Browse Source

Fix invalid option key saved agency_email on during installation

pull/3/head
Nafies Luthfi 8 years ago
parent
commit
77c52ca939
  1. 5
      app/Http/Controllers/InstallationController.php
  2. 5
      tests/Feature/InstallationTest.php

5
app/Http/Controllers/InstallationController.php

@ -31,6 +31,11 @@ class InstallationController extends Controller
{
$agencyData = collect($request->only('agency_name', 'agency_website', 'email'))
->map(function ($value, $key) {
if ($key == 'email') {
$key = 'agency_email';
}
return [
'key' => $key,
'value' => $value,

5
tests/Feature/InstallationTest.php

@ -75,5 +75,10 @@ class InstallationTest extends TestCase
'key' => 'agency_website',
'value' => 'https://example.com',
]);
$this->seeInDatabase('site_options', [
'key' => 'agency_email',
'value' => 'email@mail.com',
]);
}
}
Loading…
Cancel
Save