api = $this->createStub(Api::class); $this->login()->loginNami(); app(MemberFake::class)->shows(32, 33); $fullMember = FullMember::from(['courses' => [], 'memberships' => [], 'member' => $this->api->member(32, 33)]); FullMemberAction::shouldRun()->once()->andReturn($fullMember); InsertFullMemberAction::shouldRun()->once(); $member = Member::factory()->defaults()->for(Group::factory()->inNami(32))->inNami(33)->create(); $response = $this->from('/member')->get(route('member.resync', ['member' => $member])); $response->assertRedirect('/member'); } }