From baadb15dad29f5c0bd3fe508d1650b0767cff5f9 Mon Sep 17 00:00:00 2001 From: Etienne Pallier Date: Wed, 24 Jun 2020 20:19:59 +0200 Subject: [PATCH] bugfix action status-to-be-archived => status-tobearchived --- src/Template/Materiels/index.ctp | 2 +- src/Template/Materiels/view.ctp | 2 +- tests/TestCase/Controller/MaterielsControllerTest.php | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Template/Materiels/index.ctp b/src/Template/Materiels/index.ctp index 6997088..feeb07a 100644 --- a/src/Template/Materiels/index.ctp +++ b/src/Template/Materiels/index.ctp @@ -334,7 +334,7 @@ if ($nbMateriels > 0) { //else if (h($materiel->status) == 'VALIDATED') { if ($CAN_TBA) echo $this->Html->link('', [ - 'action' => 'statusToBeArchived', + 'action' => 'statusTobearchived', $materiel->id ], [ 'title' => 'Demander la sortie de l\'inventaire', diff --git a/src/Template/Materiels/view.ctp b/src/Template/Materiels/view.ctp index f6b4b95..f59b8cc 100755 --- a/src/Template/Materiels/view.ctp +++ b/src/Template/Materiels/view.ctp @@ -416,7 +416,7 @@ $CAN_PRINT_LABEL = $IS_VALIDATED && $configuration->hasPrinter && $USER_IS_ADMIN // Bouton TBA if ($CAN_TBA) $echoActionButton( - $this->Html, 'icon-ok-sign', $bStyle2Red, ' Demander sortie', '', 'statusToBeArchived', $entity->id, ['view'], + $this->Html, 'icon-ok-sign', $bStyle2Red, ' Demander sortie', '', 'statusTobearchived', $entity->id, ['view'], "Demander la sortie de l'inventaire" ); // Bouton ARCHIVER diff --git a/tests/TestCase/Controller/MaterielsControllerTest.php b/tests/TestCase/Controller/MaterielsControllerTest.php index 650587b..f918b92 100755 --- a/tests/TestCase/Controller/MaterielsControllerTest.php +++ b/tests/TestCase/Controller/MaterielsControllerTest.php @@ -1676,8 +1676,11 @@ class MaterielsControllerTest extends General { */ public function testUpdatePlaceEtiquetteMateriel() { $this->authSuperAdmin(); - $this->post('/materiels/set-label-is-placed/11/view'); - $this->get('/materiels/view/11'); + // on prend un materiel VALIDATED + //$id=11; + $id=3; + $this->post("/materiels/set-label-is-placed/$id/view"); // ou setLabelIsPlaced (marche pareil) + $this->get("/materiels/view/$id"); $this->assertResponseContains( ' Etiquette placée Oui ', "Le placement de l'étiquette sur le materiel ne se fait pas correctement." -- libgit2 0.21.2