add all controllers logic
This commit is contained in:
@@ -35,7 +35,8 @@ class RegistrationServiceTest extends TestCase
|
||||
'is_active' => 1,
|
||||
]);
|
||||
|
||||
session()->put('captcha_answer', 'ABCD');
|
||||
$captchaService = new RegistrationCaptchaService();
|
||||
$captcha = $captchaService->generate(4);
|
||||
|
||||
$emailService = Mockery::mock(EmailService::class);
|
||||
$emailService->shouldReceive('send')->once()->andReturn(true);
|
||||
@@ -44,7 +45,7 @@ class RegistrationServiceTest extends TestCase
|
||||
$emailService,
|
||||
new SchoolIdService(),
|
||||
new RegistrationFormatterService(new PhoneFormatterService()),
|
||||
new RegistrationCaptchaService()
|
||||
$captchaService
|
||||
);
|
||||
|
||||
$result = $service->register([
|
||||
@@ -60,7 +61,7 @@ class RegistrationServiceTest extends TestCase
|
||||
'state' => 'CT',
|
||||
'zip' => '12345',
|
||||
'accept_school_policy' => 1,
|
||||
'captcha' => 'ABCD',
|
||||
'captcha' => $captcha,
|
||||
'is_parent' => 1,
|
||||
'no_second_parent_info' => 1,
|
||||
]);
|
||||
@@ -114,7 +115,8 @@ class RegistrationServiceTest extends TestCase
|
||||
'token' => 'token',
|
||||
]);
|
||||
|
||||
session()->put('captcha_answer', 'ABCD');
|
||||
$captchaService = new RegistrationCaptchaService();
|
||||
$captcha = $captchaService->generate(4);
|
||||
|
||||
$emailService = Mockery::mock(EmailService::class);
|
||||
$emailService->shouldNotReceive('send');
|
||||
@@ -123,7 +125,7 @@ class RegistrationServiceTest extends TestCase
|
||||
$emailService,
|
||||
new SchoolIdService(),
|
||||
new RegistrationFormatterService(new PhoneFormatterService()),
|
||||
new RegistrationCaptchaService()
|
||||
$captchaService
|
||||
);
|
||||
|
||||
$result = $service->register([
|
||||
@@ -139,7 +141,7 @@ class RegistrationServiceTest extends TestCase
|
||||
'state' => 'CT',
|
||||
'zip' => '12345',
|
||||
'accept_school_policy' => 1,
|
||||
'captcha' => 'ABCD',
|
||||
'captcha' => $captcha,
|
||||
'is_parent' => 1,
|
||||
'no_second_parent_info' => 1,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user