diff --git a/tests/application/modules/admin/controllers/BibControllerTest.php b/tests/application/modules/admin/controllers/BibControllerTest.php index 6e48cea2e1a19aad3e4d1fb1083abab708e853b0..75192b2ea8e00779510fefdb6842b2dbca04bd58 100644 --- a/tests/application/modules/admin/controllers/BibControllerTest.php +++ b/tests/application/modules/admin/controllers/BibControllerTest.php @@ -1217,12 +1217,14 @@ class BibControllerLocalisationNewTest extends BibControllerTestCase { } + + + class BibControllerLocalisationNewPostTest extends BibControllerTestCase { public function setUp() { parent::setUp(); $file_system = Storm_Test_ObjectWrapper::mock() ->whenCalled('file_exists') -// ->with(ROOT_PATH . '/userfiles/photobib/localisations/bib_2_localisation_9.jpg') ->answers(true) ->whenCalled('rename') ->answers(true) @@ -1239,9 +1241,8 @@ class BibControllerLocalisationNewPostTest extends BibControllerTestCase { /** @test */ - public function responseShouldRedirectToLocalisationList() { - $this->assertRedirectTo('/admin/bib/localisations/id_bib/2', - $this->getResponseLocation()); + public function responseShouldRedirectToReferer() { + $this->assertRedirect(); } @@ -1250,13 +1251,12 @@ class BibControllerLocalisationNewPostTest extends BibControllerTestCase { $this->assertNotNull(Class_Localisation::findFirstBy(['libelle' => '5eme Etage'])); } + /** @test */ public function imageShouldExists(){ $localisation = Class_Localisation::findFirstBy(['libelle' => '5eme Etage']); $this->assertEquals('bib_2_localisation_1.png',$localisation->getImage()); } - - } @@ -1267,7 +1267,6 @@ class BibControllerLocalisatonDeleteTest extends BibControllerTestCase { parent::setUp(); $file_system = Storm_Test_ObjectWrapper::mock() ->whenCalled('file_exists') -// ->with(ROOT_PATH . '/userfiles/photobib/localisations/bib_2_localisation_9.jpg') ->answers(true) ->whenCalled('unlink') ->answers(true)