Commit baadb15dad29f5c0bd3fe508d1650b0767cff5f9

Authored by Etienne Pallier
1 parent eb30262c
Exists in master and in 1 other branch dev

bugfix action status-to-be-archived => status-tobearchived

src/Template/Materiels/index.ctp
... ... @@ -334,7 +334,7 @@ if ($nbMateriels > 0) {
334 334 //else if (h($materiel->status) == 'VALIDATED') {
335 335 if ($CAN_TBA)
336 336 echo $this->Html->link('<i class="icon-inbox"></i>', [
337   - 'action' => 'statusToBeArchived',
  337 + 'action' => 'statusTobearchived',
338 338 $materiel->id
339 339 ], [
340 340 'title' => 'Demander la sortie de l\'inventaire',
... ...
src/Template/Materiels/view.ctp
... ... @@ -416,7 +416,7 @@ $CAN_PRINT_LABEL = $IS_VALIDATED &amp;&amp; $configuration-&gt;hasPrinter &amp;&amp; $USER_IS_ADMIN
416 416 // Bouton TBA
417 417 if ($CAN_TBA)
418 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 420 "Demander la sortie de l'inventaire"
421 421 );
422 422 // Bouton ARCHIVER
... ...
tests/TestCase/Controller/MaterielsControllerTest.php
... ... @@ -1676,8 +1676,11 @@ class MaterielsControllerTest extends General {
1676 1676 */
1677 1677 public function testUpdatePlaceEtiquetteMateriel() {
1678 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 1684 $this->assertResponseContains(
1682 1685 '<TR> <TD><strong>Etiquette placée</strong></TD> <TD style="color: green">Oui</TD> </TR>',
1683 1686 "Le placement de l'étiquette sur le materiel ne se fait pas correctement."
... ...