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