Fix latest merge

This commit is contained in:
Nicolas Le Goff
2014-06-25 16:02:35 +02:00
parent 1970439edb
commit e139202f3b
3 changed files with 69 additions and 15 deletions

View File

@@ -28,7 +28,7 @@
{{ "Allowed access to the following collections" | trans }}
</th>
</tr>
{% for baseId, base in baseInfo["registrations"]["by-type"]["accepted"] %}
{% for base in baseInfo["registrations"]["by-type"]["accepted"] %}
<tr>
<td colspan="3" style="text-align:center;">
<span style="color: lightgreen;">
@@ -51,7 +51,7 @@
{{ "Rejected access to the following collections" | trans }}
</th>
</tr>
{% for baseId, base in baseInfo["registrations"]["by-type"]["rejected"] %}
{% for base in baseInfo["registrations"]["by-type"]["rejected"] %}
<tr>
<td colspan="3" style="text-align:center;">
<span style="color: red;">
@@ -74,7 +74,7 @@
{{ "Pending access to the following collections" | trans }}
</th>
</tr>
{% for baseId, base in baseInfo["registrations"]["by-type"]["pending"] %}
{% for base in baseInfo["registrations"]["by-type"]["pending"] %}
<tr>
<td colspan="3" style="text-align:center;">
<span style="color: #ffff00;"><b>{{ base["coll-name"] }}</b></span>
@@ -95,7 +95,7 @@
{{ "Temporary access to the following collections" | trans }}
</th>
</tr>
{% for baseId, base in baseInfo["registrations"]["by-type"]["in-time"] %}
{% for base in baseInfo["registrations"]["by-type"]["in-time"] %}
<tr>
<td colspan="3" style="text-align:center;">
<span style="color: lightskyblue;"><b>{{ base["coll-name"] }}</b></span>
@@ -116,7 +116,7 @@
{{ "Outdated access to the following collections" | trans }}
</th>
</tr>
{% for baseId, base in baseInfo["registrations"]["by-type"]["out-dated"] %}
{% for base in baseInfo["registrations"]["by-type"]["out-dated"] %}
<tr>
<td colspan="3" style="text-align:center;">
<span style="color:darkred;"><b>{{ base["coll-name"] }}</b></span>
@@ -137,7 +137,7 @@
{{ "Suspended access to the following collections" | trans }}
</th>
</tr>
{% for baseId, base in baseInfo["registrations"]["by-type"]["inactive"] %}
{% for base in baseInfo["registrations"]["by-type"]["inactive"] %}
<tr>
<td colspan="3" style="text-align:center;">
<span style="color:orangered;"><b>{{ base["coll-name"] }}</b></span>
@@ -167,7 +167,7 @@
<td colspan="3" style="text-align: center;"><blockquote class="cgu" style="width: 90%; height: 120px; text-align: left; overflow: auto;">{{ TOU['value'] }}</blockquote></td>
</tr>
{% endif %}
{% for baseId, collInfo in baseInfo["config"]["collections"] if (collInfo['registration'] is none and collInfo['can-register']) %}
{% for collInfo in baseInfo["config"]["collections"] if (collInfo['registration'] is none and collInfo['can-register']) %}
{% if collInfo["cgu"] is not none %}
<tr>
<td colspan="3" style="text-align: center;">{{ "login::register: L\'acces aux bases ci-dessous implique l\'acceptation des Conditions Generales d\'Utilisation (CGU) suivantes" | trans }}</td>

View File

@@ -52,12 +52,66 @@ class AccountTest extends \PhraseanetAuthenticatedWebTestCase
[
'registrations' => [
'by-type' => [
'inactive' => [new Registration()],
'accepted' => [new Registration()],
'in-time' => [new Registration()],
'out-dated' => [new Registration()],
'pending' => [new Registration()],
'rejected' => [new Registration()],
'inactive' => [[
'base-id' => '1',
'db-name' => 'db_test',
'active' => false,
'time-limited' => false,
'in-time' => false,
'registration' => null,
'coll-name' => 'BIBOO_INACTIVE',
'type' => 'inactive',
]],
'accepted' => [[
'base-id' => '2',
'db-name' => 'db_test',
'active' => true,
'time-limited' => false,
'in-time' => false,
'registration' => null,
'coll-name' => 'BIBOO_ACCEPTED',
'type' => 'accepted',
]],
'in-time' => [[
'base-id' => '3',
'db-name' => 'db_test',
'active' => true,
'time-limited' => false,
'in-time' => false,
'registration' => null,
'coll-name' => 'BIBOO_INTIME',
'type' => 'in-time',
]],
'out-dated' => [[
'base-id' => '4',
'db-name' => 'db_test',
'active' => true,
'time-limited' => false,
'in-time' => false,
'registration' => null,
'coll-name' => 'BIBOO_OUTDATED',
'type' => 'out-dated',
]],
'pending' => [[
'base-id' => '5',
'db-name' => 'db_test',
'active' => true,
'time-limited' => false,
'in-time' => false,
'registration' => null,
'coll-name' => 'BIBOO_PENDING',
'type' => 'pending',
]],
'rejected' => [[
'base-id' => '6',
'db-name' => 'db_test',
'active' => true,
'time-limited' => false,
'in-time' => false,
'registration' => null,
'coll-name' => 'BIBOO_REJECTED',
'type' => 'rejected',
]],
],
'by-collection' => []
],

View File

@@ -1032,7 +1032,7 @@ class LoginTest extends \PhraseanetAuthenticatedWebTestCase
}
self::$DI['client']->request('POST', '/login/register-classic/', $parameters);
$this->assertTrue(self::$DI['client']->getResponse()->isRedirect());
$this->assertTrue(self::$DI['client']->getResponse()->isRedirect(),self::$DI['client']->getResponse()->getContent());
if (null === $user = self::$DI['app']['repo.users']->findByEmail($parameters['email'])) {
$this->fail('User not created');
@@ -1102,7 +1102,7 @@ class LoginTest extends \PhraseanetAuthenticatedWebTestCase
if (null === $user = self::$DI['app']['repo.users']->findByEmail($parameters['email'])) {
$this->fail('User not created');
}
$this->assertTrue(self::$DI['client']->getResponse()->isRedirect());
$this->assertTrue(self::$DI['client']->getResponse()->isRedirect(),self::$DI['client']->getResponse()->getContent());
$this->assertGreaterThan(0, $emails['Alchemy\Phrasea\Notification\Mail\MailInfoUserRegistered']);
$this->assertEquals(1, $emails['Alchemy\Phrasea\Notification\Mail\MailRequestEmailConfirmation']);
$this->assertFlashMessagePopulated(self::$DI['app'], 'info', 1);