Fixed member update
This commit is contained in:
parent
c3adcc6fdb
commit
8e3befc1bd
|
@ -3,6 +3,7 @@
|
|||
namespace App\Member;
|
||||
|
||||
use App\Confession;
|
||||
use App\Setting\NamiSettings;
|
||||
use App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
@ -28,7 +29,7 @@ class UpdateJob implements ShouldQueue
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(NamiSettings $settings)
|
||||
{
|
||||
$this->member = Member::find($this->memberId);
|
||||
|
||||
|
@ -36,7 +37,7 @@ class UpdateJob implements ShouldQueue
|
|||
return;
|
||||
}
|
||||
|
||||
$response = $this->service->login()->putMember([
|
||||
$response = $settings->login()->putMember([
|
||||
'firstname' => $this->member->firstname,
|
||||
'lastname' => $this->member->lastname,
|
||||
'joined_at' => $this->member->joined_at,
|
||||
|
|
|
@ -24,7 +24,7 @@ class UpdateTest extends TestCase
|
|||
|
||||
public function testItRedirectsToMemberOverview(): void
|
||||
{
|
||||
$this->withoutExceptionHandling()->login();
|
||||
$this->withoutExceptionHandling()->login()->loginNami();
|
||||
$member = $this->member();
|
||||
$this->fakeRequest();
|
||||
|
||||
|
@ -37,7 +37,7 @@ class UpdateTest extends TestCase
|
|||
|
||||
public function testItHasPutRequest(): void
|
||||
{
|
||||
$this->withoutExceptionHandling()->login();
|
||||
$this->withoutExceptionHandling()->login()->loginNami();
|
||||
$member = $this->member();
|
||||
$this->fakeRequest();
|
||||
|
||||
|
@ -52,7 +52,7 @@ class UpdateTest extends TestCase
|
|||
|
||||
public function testItMergesExistingData(): void
|
||||
{
|
||||
$this->withoutExceptionHandling()->login();
|
||||
$this->withoutExceptionHandling()->login()->loginNami();
|
||||
$member = $this->member();
|
||||
$this->fakeRequest();
|
||||
|
||||
|
@ -69,7 +69,7 @@ class UpdateTest extends TestCase
|
|||
|
||||
public function testItUpdatesVersion(): void
|
||||
{
|
||||
$this->withoutExceptionHandling()->login();
|
||||
$this->withoutExceptionHandling()->login()->loginNami();
|
||||
$member = $this->member();
|
||||
$this->fakeRequest();
|
||||
|
||||
|
|
Loading…
Reference in New Issue