Commit 67272414 authored by Ghislain Loas's avatar Ghislain Loas

Merge branch 'hotline-master' into 'master'

revive deleted tests

See merge request !2299
parents ed29c399 c5bf76b3
......@@ -89,6 +89,8 @@ abstract class AuthControllerPreRegistrationKohaTestCase
}
class AuthControllerPreRegistrationKohaDispatchTest extends AuthControllerPreRegistrationKohaTestCase {
public function setUp() {
parent::setUp();
......@@ -113,10 +115,17 @@ class AuthControllerPreRegistrationKohaDispatchTest extends AuthControllerPreReg
public function selectBranchCodeShouldContainsOption3PipeGra() {
$this->assertXPath('//form//select[@name="branchcode"]/option[@value="3|GRA"]');
}
/** @test */
public function inputEmailCheckForSpamBotsShouldBePresent() {
$this->assertXPath('//input[@name="emailCheck"][@data-spambots="true"]');
}
}
class AuthControllerPreRegistrationKohaPostDispatchTest extends AuthControllerPreRegistrationKohaTestCase {
public function setUp() {
parent::setUp();
......@@ -140,7 +149,8 @@ class AuthControllerPreRegistrationKohaPostDispatchTest extends AuthControllerPr
'dateofbirth' => '15-09-1940',
'address' => 'rue secret',
'zipcode' => '01630',
'email' => 'thom@mail.com'],
'email' => 'thom@mail.com',
'emailCheck' => ''],
true);
}
......@@ -160,6 +170,32 @@ class AuthControllerPreRegistrationKohaPostDispatchTest extends AuthControllerPr
class AuthControllerKohaPreRegistrationSpammedPostDispatchTest extends AuthControllerPreRegistrationKohaTestCase {
public function setUp() {
parent::setUp();
$this->postDispatch('auth/pre-registration',
['branchcode' => '1|GRA',
'surname' => 'Boulard',
'firstname' => 'Thom',
'dateofbirth' => '15/09/1940',
'address' => 'rue secret',
'zipcode' => '01630',
'email' => 'thom@mail.com',
'emailCheck' => 'imabot@wcry.ru'],
true);
}
/** @test */
public function responseShouldRedirectToRoot() {
$this->assertRedirectTo('/');
}
}
class AuthControllerPreRegistrationKohaPostDispatchWithErrorReturnedTest extends AuthControllerPreRegistrationKohaTestCase {
public function setUp() {
parent::setUp();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment