Fix test with authorization: search for not presence of Depardieu

This tests fails as multiple "Gerard" may be present in database.
This commit is contained in:
Julien Fastré 2021-08-17 17:07:46 +02:00
parent 71c22b9c06
commit b88c01365d

View File

@ -200,11 +200,10 @@ class PersonSearchTest extends WebTestCase
$crawlerCanSee = $this->generateCrawlerForSearch('Gérard', 'center a_social');
$crawlerCannotSee = $this->generateCrawlerForSearch('Gérard', 'center b_social');
$this->assertRegExp('/Gérard/', $crawlerCanSee->text(),
'center a_social may see "Gérard" in center a');
$this->assertRegExp('/Aucune personne ne correspond aux termes de recherche/',
$crawlerCannotSee->text(),
'center b_social may not see any "Gérard" associated to center b');
$this->assertRegExp('/Depardieu/', $crawlerCanSee->text(),
'center a_social may see "Depardieu" in center a');
$this->assertNotRegExp('/Depardieu/', $crawlerCannotSee->text(),
'center b_social may see "Depardieu" in center b');
}