Initial commit
This commit is contained in:
20
tests/Feature/Forms/FormCaptchaTest.php
Normal file
20
tests/Feature/Forms/FormCaptchaTest.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
it('create form with captcha and raise validation issue', function () {
|
||||
$user = $this->actingAsUser();
|
||||
$workspace = $this->createUserWorkspace($user);
|
||||
$form = $this->createForm($user, $workspace, [
|
||||
'use_captcha' => true,
|
||||
]);
|
||||
|
||||
$this->postJson(route('forms.answer', $form->slug), [])
|
||||
->assertStatus(422)
|
||||
->assertJson([
|
||||
'message' => 'Please complete the captcha.',
|
||||
'errors' => [
|
||||
'h-captcha-response' => [
|
||||
'Please complete the captcha.',
|
||||
],
|
||||
],
|
||||
]);
|
||||
});
|
||||
Reference in New Issue
Block a user