Skip to content
Snippets Groups Projects
Commit dc72f59b authored by Laurent's avatar Laurent
Browse files

hotline #57673 fix annex list after library deletion

parent 45ec8b73
Branches
Tags
5 merge requests!2334Master,!2088Master,!2085Master,!2084Hotline master,!2082hotline #57673 fix annex list after library deletion
Pipeline #876 passed with stage
in 12 minutes and 20 seconds
- ticket #57673 : correction d'affichage des annexes dans cosmogramme suite à la suppression d'une bibliothèque
\ No newline at end of file
......@@ -47,6 +47,13 @@ abstract class AnnexeControllerTestCase extends CosmoControllerTestCase {
'code' => 'ACY01',
'id_origine' => 'ACY-01',
'id_bib' => 56]);
$this->fixture('Class_CodifAnnexe',
['id' => 120,
'libelle' => 'Annex lost',
'code' => 'P01',
'id_origine' => 'P01',
'id_bib' => 666]);
}
}
......@@ -66,6 +73,12 @@ class AnnexeControllerIndexTest extends AnnexeControllerTestCase {
}
/** @test */
public function lostAnnexShouldBeInTable() {
$this->assertXPathContentContains('//table//td', 'Annex lost');
}
/** @test */
public function annexeAnnecyIdOrigineShouldBeInTable() {
$this->assertXPathContentContains('//table//td', 'ACY-01');
......
......@@ -61,12 +61,16 @@ class Class_CodifAnnexe extends Storm_Model_Abstract {
public function getMailIntBib() {
return $this->getIntBib()->getMail();
return $this->hasIntBib()
? $this->getIntBib()->getMail()
: '';
}
public function getLibraryLabel() {
return $this->getIntBib()->getLabel();
return $this->hasIntBib()
? $this->getIntBib()->getLabel()
: '';
}
......
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