Skip to content
Snippets Groups Projects
Commit 2dd3e11f authored by Ghislain Loas's avatar Ghislain Loas
Browse files

eponge #56105 systeme/status is now public /opac/index/status

parent 394b9e7f
Branches
Tags
3 merge requests!2080Sandbox detach zf from storm,!2061Master,!2037eponge #56105 systeme/status is now public /opac/index/status
Pipeline #511 failed with stage
in 22 minutes and 8 seconds
- ticket #56105 : Administration : Le flux JSON de tableau de bord du bokeh est disponible publiquement à l'adresse /opac/index/status
\ No newline at end of file
......@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class IndexController extends Zend_Controller_Action {
class IndexController extends ZendAfi_Controller_Action {
public function indexAction() {
// Mettre le layout
$viewRenderer = $this->getHelper('ViewRenderer');
......@@ -133,5 +133,11 @@ class IndexController extends Zend_Controller_Action {
$data['mail']))
->send();
}
public function statusAction() {
$this->_helper->json(json_decode($this->view->status_Json(), true));
}
}
?>
\ No newline at end of file
......@@ -267,15 +267,15 @@ class Admin_SystemControllerStatusTest extends Admin_AbstractControllerTestCase
$this->assertXPathContentContains('//h1', 'Etat du système');
}
/** @test */
public function sectionShouldContainsH2WithPortal() {
$this->assertXPathContentContains('//section//h2', 'Portail');
}
/** @test */
public function pageShouldBeHtml5Valid() {
$this->assertHtml5();
}
}
\ No newline at end of file
......@@ -652,3 +652,25 @@ class IndexControllerHeartBeatTest extends Admin_AbstractControllerTestCase {
$this->assertNotXPathContentContains('//script', '/admin/index/heartbeat');
}
}
class IndexControllerStatusTest extends AbstractControllerTestCase {
protected
$_storm_default_to_volatile = true,
$_json;
public function setUp() {
parent::setUp();
$this->dispatch('/opac/index/status', true);
$this->_json = json_decode($this->_response->getBody(), true);
}
/** @test */
public function dateCreationShouldBeSet() {
$this->assertNotNull($this->_json['headers']['creation_datetime'], $this->_json);
}
}
\ No newline at end of file
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