Commit baadb15dad29f5c0bd3fe508d1650b0767cff5f9
1 parent
eb30262c
Exists in
master
and in
1 other branch
bugfix action status-to-be-archived => status-tobearchived
Showing
3 changed files
with
7 additions
and
4 deletions
Show diff stats
src/Template/Materiels/index.ctp
@@ -334,7 +334,7 @@ if ($nbMateriels > 0) { | @@ -334,7 +334,7 @@ if ($nbMateriels > 0) { | ||
334 | //else if (h($materiel->status) == 'VALIDATED') { | 334 | //else if (h($materiel->status) == 'VALIDATED') { |
335 | if ($CAN_TBA) | 335 | if ($CAN_TBA) |
336 | echo $this->Html->link('<i class="icon-inbox"></i>', [ | 336 | echo $this->Html->link('<i class="icon-inbox"></i>', [ |
337 | - 'action' => 'statusToBeArchived', | 337 | + 'action' => 'statusTobearchived', |
338 | $materiel->id | 338 | $materiel->id |
339 | ], [ | 339 | ], [ |
340 | 'title' => 'Demander la sortie de l\'inventaire', | 340 | 'title' => 'Demander la sortie de l\'inventaire', |
src/Template/Materiels/view.ctp
@@ -416,7 +416,7 @@ $CAN_PRINT_LABEL = $IS_VALIDATED && $configuration->hasPrinter && $USER_IS_ADMIN | @@ -416,7 +416,7 @@ $CAN_PRINT_LABEL = $IS_VALIDATED && $configuration->hasPrinter && $USER_IS_ADMIN | ||
416 | // Bouton TBA | 416 | // Bouton TBA |
417 | if ($CAN_TBA) | 417 | if ($CAN_TBA) |
418 | $echoActionButton( | 418 | $echoActionButton( |
419 | - $this->Html, 'icon-ok-sign', $bStyle2Red, ' Demander sortie', '', 'statusToBeArchived', $entity->id, ['view'], | 419 | + $this->Html, 'icon-ok-sign', $bStyle2Red, ' Demander sortie', '', 'statusTobearchived', $entity->id, ['view'], |
420 | "Demander la sortie de l'inventaire" | 420 | "Demander la sortie de l'inventaire" |
421 | ); | 421 | ); |
422 | // Bouton ARCHIVER | 422 | // Bouton ARCHIVER |
tests/TestCase/Controller/MaterielsControllerTest.php
@@ -1676,8 +1676,11 @@ class MaterielsControllerTest extends General { | @@ -1676,8 +1676,11 @@ class MaterielsControllerTest extends General { | ||
1676 | */ | 1676 | */ |
1677 | public function testUpdatePlaceEtiquetteMateriel() { | 1677 | public function testUpdatePlaceEtiquetteMateriel() { |
1678 | $this->authSuperAdmin(); | 1678 | $this->authSuperAdmin(); |
1679 | - $this->post('/materiels/set-label-is-placed/11/view'); | ||
1680 | - $this->get('/materiels/view/11'); | 1679 | + // on prend un materiel VALIDATED |
1680 | + //$id=11; | ||
1681 | + $id=3; | ||
1682 | + $this->post("/materiels/set-label-is-placed/$id/view"); // ou setLabelIsPlaced (marche pareil) | ||
1683 | + $this->get("/materiels/view/$id"); | ||
1681 | $this->assertResponseContains( | 1684 | $this->assertResponseContains( |
1682 | '<TR> <TD><strong>Etiquette placée</strong></TD> <TD style="color: green">Oui</TD> </TR>', | 1685 | '<TR> <TD><strong>Etiquette placée</strong></TD> <TD style="color: green">Oui</TD> </TR>', |
1683 | "Le placement de l'étiquette sur le materiel ne se fait pas correctement." | 1686 | "Le placement de l'étiquette sur le materiel ne se fait pas correctement." |