diff --git a/templates/web/prod/notification.html.twig b/templates/web/prod/notification.html.twig
index 978abc6013..6bf5778179 100644
--- a/templates/web/prod/notification.html.twig
+++ b/templates/web/prod/notification.html.twig
@@ -1,4 +1,4 @@
-
+
@@ -10,6 +10,10 @@
{{notification['created_on']}}
|
+
+ ✅
+ 👁
+ |
diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/SessionManagerSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/SessionManagerSubscriberTest.php
index 538c780028..01c28d040e 100644
--- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/SessionManagerSubscriberTest.php
+++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/SessionManagerSubscriberTest.php
@@ -2,8 +2,8 @@
namespace Alchemy\Tests\Phrasea\Core\Event\Subscriber;
-use Alchemy\Phrasea\Core\Event\Subscriber\SessionManagerSubscriber;
use Alchemy\Phrasea\Application;
+use Alchemy\Phrasea\Core\Event\Subscriber\SessionManagerSubscriber;
use Alchemy\Phrasea\Model\Entities\Session;
use Symfony\Component\HttpKernel\Client;
@@ -235,10 +235,6 @@ class SessionManagerSubscriberTest extends \PhraseanetAuthenticatedWebTestCase
$app['orm.em'] = $this->getMockBuilder('Doctrine\ORM\EntityManager')->disableOriginalConstructor()->getMock();
$app['orm.em']->expects($this->never())->method('flush');
- $app->get('/login', function () {
- return '';
- })->bind("homepage");
-
$app->get($route, function () {
return '';
});
@@ -254,8 +250,43 @@ class SessionManagerSubscriberTest extends \PhraseanetAuthenticatedWebTestCase
public function forbiddenRouteProvider()
{
return [
- ['/admin/databox/17/informations/documents/'],
+ ['/'],
+ ['/login/'],
+ ];
+ }
+
+ /**
+ * @dataProvider notUserActivityRouteProvider
+ */
+ public function testNotUserActivityRoutes($route)
+ {
+ $app = new Application(Application::ENV_TEST);
+ $app['dispatcher']->addSubscriber(new SessionManagerSubscriber($app));
+ $app['authentication'] = $this->getMockBuilder('Alchemy\Phrasea\Authentication\Authenticator')->disableOriginalConstructor()->getMock();
+ $app['authentication']->expects($this->once())->method('isAuthenticated');
+
+ $app['orm.em'] = $this->getMockBuilder('Doctrine\ORM\EntityManager')->disableOriginalConstructor()->getMock();
+ $app['orm.em']->expects($this->never())->method('flush');
+
+ $app->get($route, function () {
+ return '';
+ });
+
+ $client = new Client($app);
+ $client->request('GET', $route, [], [], [
+ 'HTTP_CONTENT-TYPE' => 'application/json',
+ 'HTTP_ACCEPT' => 'application/json',
+ 'HTTP_X-Requested-With' => 'XMLHttpRequest',
+ ]);
+ }
+
+ public function notUserActivityRouteProvider()
+ {
+ return [
+ ['/session/'],
+ ['/user/'],
['/admin/task-manager/tasks/'],
+ ['/admin/databox/17/informations/documents/']
];
}
}