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

add validated status to numeric ressource album

parent bf1ef052
Branches
Tags 6.20
1 merge request!780Master
......@@ -251,7 +251,8 @@ class Class_WebService_BibNumerique_RessourceNumerique {
->setIdOrigine($this->getId())
->setUrlOrigine($this->getBaseUrl())
->setCategorie($categorie)
->setRessources($this->getRessources());
->setRessources($this->getRessources())
->setStatus(Class_Album::STATUS_VALIDATED);
$this->importMatieres($album);
......
......@@ -305,4 +305,40 @@ class BatchControllerRunMoissonnageOrpheaTest extends BatchControllerTestCase {
$this->assertNotNull(Class_Album::findFirstBy(['titre' => 'Ornithogale pyramidale']));
}
}
class BatchControllerIndexOrpheaTest extends BatchControllerTestCase {
public function tearDown() {
Storm_Model_Loader::defaultToDb();
parent::tearDown();
}
public function setUp() {
parent::setUp();
Storm_Model_Loader::defaultToVolatile();
$this->fixture('Class_Album',
['id' => 1,
'titre' => 'Orphea Album',
'status' => Class_Album::STATUS_VALIDATED,
'type_doc_id' => Class_TypeDoc::ORPHEA]);
$this->batch_indexation = $this->fixture('Class_Batch',
['id' => 4,
'type' => 'INDEX_RESSOURCES_NUMERIQUES',
'last_run' => '2012-05-01 10:23:00']);
$this->batch_indexation->run();
}
/** @test */
public function orpheaAlbumShoudlBeIndexed() {
$this->assertNotNull(Class_Notice::find(1));
}
}
?>
......@@ -351,6 +351,13 @@ class HarvestControllerOrpheaUpdateTest extends HarvestControllerOrpheaTestCase
}
/** @test */
public function pyramidaleAlbumShouldBeSavedWithValidatedStatus() {
$this->assertEquals(Class_Album::STATUS_VALIDATED, Class_Album::findFirstBy(['titre' => 'Pyramidale'])->getStatus());
}
/** @test */
public function octogonaleShouldNotBeDeleted() {
$this->assertNotNull(Class_Album::findFirstBy(['titre' => 'Octogonale']));
......
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